package command_rpc

  1. Overview
  2. Docs
type 'a with_connection_args = ?heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t -> ?propagate_stderr:bool -> ?env:Async.Process.env -> ?process_create: (prog:string -> args:string list -> ?env:Async.Process.env -> unit -> Async.Process.t Async.Deferred.Or_error.t) -> prog:string -> args:string list -> 'a

create spawns a child process and returns an RPC connection that operates on the child's stdin and stdout. The child will be killed and reaped when the connection is closed. If propagate_stderr is true, the child's stderr will be printed on the parent's stderr; otherwise it will be ignored.

with_close spawns a child and connects like create, calls the function passed in on the resulting connection, and then closes the connection and kills the child.