sig
type 'a or_error = ('a, string) Result.result
type 'a gen = unit -> 'a option
val escape_str : string -> string
type call_result =
< errcode : int; status : Unix.process_status; stderr : string;
stdout : string >
val call_full :
?bufsize:int ->
?stdin:[ `Gen of string CCUnix.gen | `Str of string ] ->
?env:string array ->
('a, Buffer.t, unit, CCUnix.call_result) Pervasives.format4 -> 'a
val call :
?bufsize:int ->
?stdin:[ `Gen of string CCUnix.gen | `Str of string ] ->
?env:string array ->
('a, Buffer.t, unit, string * string * int) Pervasives.format4 -> 'a
val call_stdout :
?bufsize:int ->
?stdin:[ `Gen of string CCUnix.gen | `Str of string ] ->
?env:string array ->
('a, Buffer.t, unit, string) Pervasives.format4 -> 'a
type line = string
type async_call_result =
< close_all : unit; close_err : unit; close_in : unit;
close_out : unit; stderr : CCUnix.line CCUnix.gen;
stdin : CCUnix.line -> unit; stdout : CCUnix.line CCUnix.gen;
wait : Unix.process_status; wait_errcode : int >
val async_call :
?env:string array ->
('a, Buffer.t, unit, CCUnix.async_call_result) Pervasives.format4 -> 'a
val stdout : < stdout : 'a; .. > -> 'a
val stderr : < stderr : 'a; .. > -> 'a
val status : < status : 'a; .. > -> 'a
val errcode : < errcode : 'a; .. > -> 'a
val with_in :
?mode:int ->
?flags:Unix.open_flag list ->
string -> f:(Pervasives.in_channel -> 'a) -> 'a
val with_out :
?mode:int ->
?flags:Unix.open_flag list ->
string -> f:(Pervasives.out_channel -> 'a) -> 'a
val with_process_in : string -> f:(Pervasives.in_channel -> 'a) -> 'a
val with_process_out : string -> f:(Pervasives.out_channel -> 'a) -> 'a
type process_full =
< close : Unix.process_status; stderr : Pervasives.in_channel;
stdin : Pervasives.out_channel; stdout : Pervasives.in_channel >
val with_process_full :
?env:string array -> string -> f:(CCUnix.process_full -> 'a) -> 'a
val with_connection :
Unix.sockaddr ->
f:(Pervasives.in_channel -> Pervasives.out_channel -> 'a) -> 'a
exception ExitServer
val establish_server :
Unix.sockaddr ->
f:(Pervasives.in_channel -> Pervasives.out_channel -> 'a) -> unit
val with_file_lock :
kind:[ `Read | `Write ] -> string -> (unit -> 'a) -> 'a
module Infix :
sig
val ( ?| ) :
('a, Buffer.t, unit, CCUnix.call_result) Pervasives.format4 -> 'a
val ( ?|& ) :
('a, Buffer.t, unit, CCUnix.async_call_result) Pervasives.format4 ->
'a
end
val ( ?| ) : ('a, Buffer.t, unit, call_result) format4 -> 'a
val ( ?|& ) : ('a, Buffer.t, unit, async_call_result) format4 -> 'a
end