lwt
lwt copied to clipboard
Support `Lwt_process` in multi-domain settings
Currently, calling Lwt_process
functions cause calls to Lwt_unix.fork
which fail in case where multiple domains have been started. It should be possible to use a spawn
function instead of a fork to support Lwt_process
.
See details in:
Originally posted by @EduardoRFS in https://github.com/ocsigen/lwt/issues/923#issuecomment-1167203901
See also, Lwt_process relies on Unix.execve
, which is not safe to call in a multi-threaded environment either, as it may end up trying to allocate memory which is not async-signal-safe: https://discuss.ocaml.org/t/deprecation-of-lwt-unix-set-default-async-method/10791/6?u=edwin