Module Ketrew.Unix_process

module Unix_process: sig .. end


Manage calls to Unix processes
module Exit_code: sig .. end
Higher-level representation of Unix exit codes.
val exec : ?bin:string ->
string list ->
(string * string * Exit_code.t,
[> `Process of [> `Exec of string * string list ] * [> `Exn of exn ] ])
Unix_io.Deferred_result.t
Execute a process with a given list of strings as “argv”, if you can provide the ~bin argument to specify the actual file to be executed. The function returns the tuple (stdout, stderr, exit_code).
val succeed : ?bin:string ->
string list ->
(string * string,
[> `Process of
[> `Exec of string * string list ] *
[> `Exn of exn | `Non_zero of string ] ])
Unix_io.Deferred_result.t
Do like Ketrew.Unix_process.exec but fail if the process does not exit with 0 status.
val error_to_string : [< `Process of
[< `Exec of string * string list ] *
[< `Exn of exn | `Non_zero of string ] ] ->
string
Display-friendly version of the errors of this module.