ProcessNotify

Notifications for Process connections.

interface ref ProcessNotify

Public Functions

created

ProcessMonitor calls this when it is created.

fun ref created(
  process: ProcessMonitor ref)
: None val

Parameters

Returns


stdout

ProcessMonitor calls this when new data is received on STDOUT of the forked process

fun ref stdout(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val

Parameters

Returns


stderr

ProcessMonitor calls this when new data is received on STDERR of the forked process

fun ref stderr(
  process: ProcessMonitor ref,
  data: Array[U8 val] iso)
: None val

Parameters

Returns


failed

ProcessMonitor calls this if we run into errors communicating with the forked process.

fun ref failed(
  process: ProcessMonitor ref,
  err: (ExecveError val | ForkError val | KillError val | 
    PipeError val | Unsupported val | WaitpidError val | 
    WriteError val | CapError val))
: None val

Parameters

Returns


expect

Called when the process monitor has been told to expect a certain quantity of bytes. This allows nested notifiers to change the expected quantity, which allows a lower level protocol to handle any framing.

fun ref expect(
  process: ProcessMonitor ref,
  qty: USize val)
: USize val

Parameters

Returns


dispose

Call when ProcessMonitor terminates to cleanup ProcessNotify. We return the exit code of the child process.

fun ref dispose(
  process: ProcessMonitor ref,
  child_exit_code: I32 val)
: None val

Parameters

Returns