type expect_match = [
Describe expectation about the output of the process. Lines includes the EOL (i.e. \n).
val spawn : ?verbose:bool -> ?verbose_output:( string -> unit ) -> ?timeout:float option -> ?env:string array -> ?use_stderr:bool -> string -> string array -> t
spawn prg args Start a process and monitor its output. Contrary to
Unix.create_process, you don't need to repeat the program name at the beginning of args.
~timeout: define the default timeout, in seconds. None means that you can wait forever
~env: provide environment to run the process
~use_stderr: redirect stderr to stdout and process it through expect
val send : t -> string -> unit
Send a string to a process.
expect t ~fmatches matches dflt Waits for output of the process and match it against expectations
matches. If no expectations match at timeout, returns
dflt. You can use
~fmatch to define while processing the output what the result is, if you find a match, return
Some res otherwise return
None. The function take into account
~fmatch and it picks the first result which is not