Up

Module Connection

Signature

type 'a with_connection_args = ?propagate_stderr:bool -> 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.