Skip to content

ProcessMonitor

[Source]

Fork+execs / creates a child process and monitors it. Notifies a client about STDOUT / STDERR events.

actor tag ProcessMonitor is
  AsioEventNotify tag

Implements


Constructors

create

[Source]

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

Returns


Public Behaviours

print

[Source]

Print some bytes and append a newline.

be print(
  data: (String val | Array[U8 val] val))

Parameters


write

[Source]

Write to STDIN of the child process.

be write(
  data: (String val | Array[U8 val] val))

Parameters


printv

[Source]

Print an iterable collection of ByteSeqs.

be printv(
  data: ByteSeqIter val)

Parameters


writev

[Source]

Write an iterable collection of ByteSeqs.

be writev(
  data: ByteSeqIter val)

Parameters


done_writing

[Source]

Set the _done_writing flag to true. If _pending is empty we can close the _stdin pipe.

be done_writing()

dispose

[Source]

Terminate child and close down everything.

be dispose()

timer_notify

[Source]

Windows IO polling timer has fired

be timer_notify()

Public Functions

expect

[Source]

A stdout call on the notifier must contain exactly qty bytes. If qty is zero, the call can contain any amount of data.

fun ref expect(
  qty: USize val = 0)
: None val

Parameters

Returns