package eio
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c1f04986b401094176494863dde1ca9b292b59fdc679a9d7023e558d80fb5b15
sha512=92ed8cf20300b8a4e0141bdbc373c0803c5a24530cb65852637d905fff4a5b956a8859a00a424034ff78c1112da9b0391194bcd558326168bdebd1ce683a8890
doc/eio.unix/Eio_unix/Process/index.html
Module Eio_unix.ProcessSource
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.
val spawn_unix :
sw:Eio.Std.Switch.t ->
_ mgr ->
?cwd:Eio.Fs.dir_ty Eio.Path.t ->
?pgid:int ->
?uid:int ->
?gid:int ->
?login_tty:Fd.t ->
fds:(int * Fd.t * Private.Fork_action.blocking) list ->
?env:Eio.Process.Env.t ->
?executable:string ->
string list ->
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.
The uid, gid and pgid parameters weren't available.
If 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.