package core_extended

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Process dispatching

type status = [
  1. | `Timeout of Core.Time.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.

type t
type result = {
  1. command : t;
  2. status : status;
  3. stdout : string;
  4. 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 -> ?preserve_euid: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 callback_with_stderr : add:(string -> int -> unit) -> add_err:(string -> int -> unit) -> flush:(unit -> unit) -> unit reader
val run : (t -> 'a reader -> 'a) with_run_flags
val run_k : ((t -> 'a reader -> 'a) -> 'b) -> 'b with_run_flags
val test : (t -> bool) with_test_flags
val test_k : ((t -> bool) -> 'a) -> 'a with_test_flags
OCaml

Innovation. Community. Security.