package eio
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=807ecef337dda849b05d3dbd17a928e6f5c636e76eb15e2213667c91127718a7
sha512=8f055aec34c9347eed2cbaa4ee439399bbe3d6a546f2c2b52e27f733fe822f4acdee3e00e4e64ae3eb922c2772535952f8e81b546802fe945fd32d3fab88b7b9
doc/eio.unix/Eio_unix/Process/index.html
Module Eio_unix.Process
Source
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 ->
fds:(int * Fd.t * Private.Fork_action.blocking) list ->
?env:string array ->
?executable:string ->
string list ->
ty Eio.Std.r
spawn_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 Fork_action.inherit_fds
directly, rather than just flows for the standard streams.
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.