-
Notifications
You must be signed in to change notification settings - Fork 5
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
Lwt_unix.fork causes trouble #15
Comments
This is a bug in Lwt. It needs to use |
A work-around is to do this before running the Eio mainloop: let () =
(* Let Lwt install its buggy signal handler now. Then we'll put it back. *)
Lwt_main.run (Lwt.pause ());
Sys.(set_signal sigchld) Signal_default With this, you can't spawn processes using Lwt, but you can using Eio, and there's no memory corruption. |
Probably needs an extension to Lwt's engine type: ocsigen/lwt#991 |
Just mentioning that the work-around above also seems to have worked to fix my code that was apparently hanging on |
The tests run
Lwt_process.(pread (shell "echo test")
, but this isn't reliable.Simpler test case:
Fails with:
(the number of "ok"s varies)
The text was updated successfully, but these errors were encountered: