package eio

  1. Overview
  2. Docs
Effect-based direct-style IO API for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

eio-1.3.tbz
sha256=8ed5c13e6689f31c85dca5f12762d84b8cc0042a7b07d3e464df6eb4b72b3dfc
sha512=46e8f817f32c3316e7f35835a136ad177a295b3306351eb2efa2386482b0169a5b19ed2925b32da2a1f10d40f083fe3d588dd401908f9fec6e4a44cd68535204

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.

Sourcetype ty = [ `Generic | `Unix ] Eio.Process.ty
Sourcetype 'a t = ([> ty ] as 'a) Eio.Std.r
Sourcetype mgr_ty = [ `Generic | `Unix ] Eio.Process.mgr_ty
Sourcetype 'a mgr = ([> mgr_ty ] as 'a) Eio.Std.r
Sourcemodule Pi : sig ... end
Sourcemodule Make_mgr (X : sig ... end) : Pi.MGR with type t = X.t and type tag = [ `Generic | `Unix ]
Sourceval 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 Private.Fork_action.inherit_fds directly, rather than just flows for the standard streams.

Sourceval sigchld : Eio.Condition.t

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.

Sourceval install_sigchld_handler : unit -> unit

install_sigchld_handler () sets the signal handler for SIGCHLD to broadcast sigchld.

OCaml

Innovation. Community. Security.

On This Page
  1. Types