type return = {exitCode : int;stdout : string;stderr : string;
}type event = | Spawned| Stdout of string| Stderr of string| Closed| ProcessError of JsError.t
Low-level API for long-running processes
val spawn_process : string -> string array -> ?options:Options.t -> unit -> tval kill : t -> ?signal:string -> unit -> unitval on :
t ->
[ `Close of code:int -> ?signal:string -> unit -> unit
| `Disconnect of unit -> unit
| `Error of err:JsError.t -> unit
| `Exit of code:int -> ?signal:string -> unit -> unit ] ->
unitHigh-level API that waits for process to complete
val exec :
?logger:(event -> unit) ->
?stdin:string ->
?options:Options.t ->
string ->
return Promise.tval spawn :
?logger:(event -> unit) ->
?stdin:string ->
?options:Options.t ->
string ->
string array ->
return Promise.t