module Lwt_process: sig..end
This modules allow you to spawn processes and communicate with them.
type command = string * string array
A command is a program name with a list of arguments
val shell : string -> command
A command executed with "/bin/sh"
All the following functions take an optionnal argument timeout. If specified, after expiration, the process will be sent a Unix.sigkill signal and channels will be closed.
High-level functions ¶
type redirection =
| `FD_copy of Unix.file_descr
| `FD_move of Unix.file_descr
| `Keep ]
A file descriptor redirection. It describe how standard file
descriptors are redirected in the child process.
Note: all optionnal redirection argumetns default to `Keep
Executes the given command and returns its exit status.
Spawning processes ¶
type state =
||||Running||(*||The process is still running||*)|
||||Exited of Unix.process_status||(*||The process has exited||*)|
State of a sub-process