module Lwt_process:sig..end
typecommand =string * string array
("ls", [|"ls"; "-l"|])
.
Notes:
"\000". For
example: ("", [|"echo"; "\000foo bar"|])
is the same as:
("", [|"echo"; "foo"; "bar"|])
.val shell : string -> command"/bin/sh -c <cmd>" on
Unix and "cmd.exe /c <cmd>" on Windows).timeout. If specified, after expiration, the process will be
sent a Unix.sigkill signal and channels will be closed.typeredirection =[ `Close
| `Dev_null
| `FD_copy of Unix.file_descr
| `FD_move of Unix.file_descr
| `Keep ]
`Keepval exec : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stdout:redirection ->
?stderr:redirection ->
command -> Unix.process_status Lwt.tval pread : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection -> command -> string Lwt.tval pread_chars : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection -> command -> char Lwt_stream.tval pread_line : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection -> command -> string Lwt.tval pread_lines : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection -> command -> string Lwt_stream.tval pwrite : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> string -> unit Lwt.tval pwrite_chars : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> char Lwt_stream.t -> unit Lwt.tval pwrite_line : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> string -> unit Lwt.tval pwrite_lines : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> string Lwt_stream.t -> unit Lwt.tval pmap : ?timeout:float ->
?env:string array ->
?stderr:redirection ->
command -> string -> string Lwt.tval pmap_chars : ?timeout:float ->
?env:string array ->
?stderr:redirection ->
command -> char Lwt_stream.t -> char Lwt_stream.tval pmap_line : ?timeout:float ->
?env:string array ->
?stderr:redirection ->
command -> string -> string Lwt.tval pmap_lines : ?timeout:float ->
?env:string array ->
?stderr:redirection ->
command -> string Lwt_stream.t -> string Lwt_stream.ttype state =
| |
Running |
(* | The process is still running | *) |
| |
Exited of |
(* | The process has exited | *) |
class process_none :?timeout:float -> ?env:string array -> ?stdin:redirection -> ?stdout:redirection -> ?stderr:redirection -> command ->object..end
val open_process_none : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stdout:redirection ->
?stderr:redirection ->
command -> process_noneval with_process_none : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stdout:redirection ->
?stderr:redirection ->
command -> (process_none -> 'a Lwt.t) -> 'a Lwt.tclass process_in :?timeout:float -> ?env:string array -> ?stdin:redirection -> ?stderr:redirection -> command ->object..end
val open_process_in : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection ->
command -> process_inval with_process_in : ?timeout:float ->
?env:string array ->
?stdin:redirection ->
?stderr:redirection ->
command -> (process_in -> 'a Lwt.t) -> 'a Lwt.tclass process_out :?timeout:float -> ?env:string array -> ?stdout:redirection -> ?stderr:redirection -> command ->object..end
val open_process_out : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> process_outval with_process_out : ?timeout:float ->
?env:string array ->
?stdout:redirection ->
?stderr:redirection ->
command -> (process_out -> 'a Lwt.t) -> 'a Lwt.tclass process :?timeout:float -> ?env:string array -> ?stderr:redirection -> command ->object..end
val open_process : ?timeout:float ->
?env:string array ->
?stderr:redirection -> command -> processval with_process : ?timeout:float ->
?env:string array ->
?stderr:redirection ->
command -> (process -> 'a Lwt.t) -> 'a Lwt.tclass process_full :?timeout:float -> ?env:string array -> command ->object..end
val open_process_full : ?timeout:float ->
?env:string array -> command -> process_fullval with_process_full : ?timeout:float ->
?env:string array ->
command -> (process_full -> 'a Lwt.t) -> 'a Lwt.t