ProcessMonitor¶
Fork+execs / creates a child process and monitors it. Notifies a client about STDOUT / STDERR events.
Implements¶
- AsioEventNotify tag
Constructors¶
create¶
Create infrastructure to communicate with a forked child process and register the asio events. Fork child process and notify our user about incoming data via the notifier.
new tag create(
auth: StartProcessAuth val,
backpressure_auth: ApplyReleaseBackpressureAuth val,
notifier: ProcessNotify iso,
filepath: FilePath val,
args: Array[String val] val,
vars: Array[String val] val,
wdir: (FilePath val | None val) = reference,
process_poll_interval: U64 val = call)
: ProcessMonitor tag^
Parameters¶
- auth: StartProcessAuth val
- backpressure_auth: ApplyReleaseBackpressureAuth val
- notifier: ProcessNotify iso
- filepath: FilePath val
- args: Array[String val] val
- vars: Array[String val] val
- wdir: (FilePath val | None val) = reference
- process_poll_interval: U64 val = call
Returns¶
- ProcessMonitor tag^
Public Behaviours¶
print¶
Print some bytes and append a newline.
Parameters¶
write¶
Write to STDIN of the child process.
Parameters¶
printv¶
Print an iterable collection of ByteSeqs.
Parameters¶
- data: ByteSeqIter val
writev¶
Write an iterable collection of ByteSeqs.
Parameters¶
- data: ByteSeqIter val
done_writing¶
Set the _done_writing flag to true. If _pending is empty we can close the _stdin pipe.
dispose¶
Terminate child and close down everything.
timer_notify¶
Windows IO polling timer has fired
Public Functions¶
expect¶
A stdout
call on the notifier must contain exactly qty
bytes. If
qty
is zero, the call can contain any amount of data.
Parameters¶
- qty: USize val = 0
Returns¶
- None val