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
val create : (unit ‑> Async.Rpc.Connection.t Core.Or_error.t Async.Deferred.t) with_connection_args
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.
val with_close : ((Async.Rpc.Connection.t ‑> 'a Core.Or_error.t Async.Deferred.t) ‑> 'a Core.Or_error.t Async.Deferred.t) with_connection_args
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.