package shell

  1. Overview
  2. Docs

Module Shell.ProcessSource

Process dispatching

Sourcetype status = [
  1. | `Timeout of Core.Time_float.Span.t
  2. | `Exited of int
  3. | `Signaled of Core.Signal.t
]

The termination status of a process. This is an extension of Unix.Process_status.t to allow timeouts.

Sourcetype t
Sourcetype result = {
  1. command : t;
  2. status : status;
  3. stdout : string;
  4. stderr : string;
}
Sourceexception Failed of result
Sourceval to_string : t -> string
Sourceval status_to_string : status -> string
Sourceval set_defaults : ?timeout:Core.Time_float.Span.t option -> ?verbose:bool -> ?echo:bool -> ?preserve_euid:bool -> ?strict_errors:bool -> unit -> unit
Sourceval format_failed : result -> string
Sourceval cmd : string -> string list -> t
Sourceval shell : ?strict_errors:bool -> string -> t
Sourceval make_ssh_command : ?ssh_options:string list -> ?quote_args:bool -> ?user:string -> host:string -> string list -> t
Sourceval remote : ?ssh_options:string list -> ?quote_args:bool -> ?user:string -> host:string -> t -> t
Sourcetype 'a reader
Sourceval content : string reader
Sourceval content_and_stderr : (string * string) reader
Sourceval discard : unit reader
Sourceval lines : ?eol:char -> unit -> string list reader
Sourceval head : ?eol:char -> unit -> string option reader
Sourceexception Empty_head
Sourceval head_exn : ?eol:char -> unit -> string reader
Sourceval one_line : ?eol:char -> unit -> string Core.Or_error.t reader
Sourceval one_line_exn : ?eol:char -> unit -> string reader
Sourceval callback : add:(Core.Bytes.t -> int -> unit) -> flush:(unit -> unit) -> unit reader
Sourceval callback_with_stderr : add:(Core.Bytes.t -> int -> unit) -> add_err:(Core.Bytes.t -> int -> unit) -> flush:(unit -> unit) -> unit reader
Sourceval run : (t -> 'a reader -> 'a) with_run_flags
Sourceval run_k : ((t -> 'a reader -> 'a) -> 'b) -> 'b with_run_flags
Sourceval test : (t -> bool) with_test_flags
Sourceval test_k : ((t -> bool) -> 'a) -> 'a with_test_flags