Module Eio_unix.Process
Spawning child processes with extra control.
This extends the Eio.Process API with more control over file-descriptors.
Types
These extend the types in Eio.Process with support for file descriptors.
type ty = [ `Generic | `Unix ] Eio.Process.tytype 'a t = ([> Eio_unix.Process.ty ] as 'a) Eio.Std.rtype mgr_ty = [ `Generic | `Unix ] Eio.Process.mgr_tytype 'a mgr = ([> Eio_unix.Process.mgr_ty ] as 'a) Eio.Std.rmodule Pi : sig ... endval spawn_unix :
sw:Eio.Std.Switch.t ->
_ Eio_unix.Process.mgr ->
?cwd:Eio.Fs.dir_ty Eio.Path.t ->
?pgid:int ->
fds:(int * Eio_unix.Fd.t * Eio_unix.Private.Fork_action.blocking) list ->
?env:string array ->
?executable:string ->
string list ->
Eio_unix.Process.ty Eio.Std.rspawn_unix ~sw mgr ~fds args spawns a child process running the command args.
The arguments are as for Eio.Process.spawn, except that it takes a list of FD mappings for Private.Fork_action.inherit_fds directly, rather than just flows for the standard streams.
val sigchld : Eio.Condition.tIf an Eio backend installs a SIGCHLD handler, the handler will broadcast on this condition.
This allows non-Eio libraries (such as Lwt) to share its signal handler.
Note: Not all backends install a handler (e.g. eio_linux uses process descriptors instead), so be sure to call install_sigchld_handler if you need to use this.
install_sigchld_handler () sets the signal handler for SIGCHLD to broadcast sigchld.