Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a way to share SIGCHLD with other libraries #991

Closed
talex5 opened this issue Jun 5, 2023 · 2 comments
Closed

Need a way to share SIGCHLD with other libraries #991

talex5 opened this issue Jun 5, 2023 · 2 comments

Comments

@talex5
Copy link
Contributor

talex5 commented Jun 5, 2023

Currently, Lwt_unix installs a SIGCHLD signal handler soon after start-up. It uses this to implement waitpid.

This has a couple of problems. The first problem is that, due to #981, the handler corrupts memory and leads to segfaults. However, even when that is fixed it would still be useful to be able to fork processes using both Lwt and e.g. Eio. Currently, eio_posix installs a handler and then Lwt overwrites it. And even with eio_linux (which doesn't use a signal handler), Lwt's handler may reap Eio's processes before it can collect them.

Therefore, I propose adding some kind of process support to Lwt_engine.t. Then e.g. lwt_eio can provide an engine that delegates signal handling to Eio.

@raphael-proust
Copy link
Collaborator

IIUC this is fixed by #993

@talex5 is this correct?

@talex5
Copy link
Contributor Author

talex5 commented Jul 17, 2023

Yes, it's fixed now - thanks!

@talex5 talex5 closed this as completed Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants