Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type 'a with_connection_args =
?wait_for_stderr_transfer:bool ->
?connection_description:Core.Info.t ->
?handshake_timeout:Core.Time.Span.t ->
?heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t ->
?max_message_size:int ->
?implementations:unit Async.Rpc.Implementations.t ->
?propagate_stderr:bool ->
?env:Async.Process.env ->
?process_create:
(prog:string ->
args:string list ->
?env:Async.Process.env ->
?working_dir:string ->
unit ->
Async.Process.t Async.Deferred.Or_error.t) ->
?working_dir:string ->
prog:string ->
args:string list ->
'a
val create : (unit -> 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 :
((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
, then calls the function passed in on the resulting connection. Like Rpc.Connection.with_close
, if implementations
is passed, with_close
will not return until the connection is closed by either the parent or the child; otherwise, it closes the connection and kills the child when the provided function returns.
val rpc_connection : t -> Async.Rpc.Connection.t
Get the RPC connection needed to talk to the command-rpc executable.
module Expert : sig ... end
This module exists for testing purposes only. For example, clients can test whether their command-rpc server cleans up after itself properly when a ctrl-c at the command line kills a whole process group, server included.