module Process: sig
.. end
Process dispatching
type
status = [ `Exited of int
| `Signaled of Core.Std.Signal.t
| `Timeout of Core.Time.Span.t ]
The termination status of a process.
This is an extension of Unix.Process_status.t
to allow timeouts.
type
t
type
result = {
|
command :t ; |
|
status :status ; |
|
stdout :string ; |
|
stderr :string ; |
}
exception Failed of result
val to_string : t -> string
val status_to_string : status -> string
val set_defaults : ?timeout:Core.Time.Span.t option ->
?verbose:bool -> ?echo:bool -> unit -> unit
val format_failed : result -> string
val cmd : string -> string list -> t
val shell : string -> t
val make_ssh_command : ?ssh_options:string list ->
?quote_args:bool ->
?user:string -> host:string -> string list -> t
val remote : ?ssh_options:string list ->
?quote_args:bool ->
?user:string -> host:string -> t -> t
type 'a
reader
val content : string reader
val content_and_stderr : (string * string) reader
val discard : unit reader
val lines : ?eol:char -> unit -> string list reader
val head : ?eol:char -> unit -> string option reader
exception Empty_head
val head_exn : ?eol:char -> unit -> string reader
val callback : add:(string -> int -> unit) ->
flush:(unit -> unit) -> unit reader
val run : (t -> 'a reader -> 'a) Shell.with_run_flags
val run_k : ((t -> 'a reader -> 'a) -> 'b) ->
'b Shell.with_run_flags
val test : (t -> bool) Shell.with_test_flags
val test_k : ((t -> bool) -> 'a) -> 'a Shell.with_test_flags