Module Ketrew_unix_process (.ml)

module Ketrew_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 ] ])
Ketrew_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 ] ])
Ketrew_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.