Effect Processpub

Source
:effect(pub) Process
  .spawn-process ( Str  (Result AnyUInt Str) )
  .wait ( AnyUInt  (Result AnyInt Str) )
  .kill ( AnyUInt  (Result Unit Str) )
  .run ( Str  (Result Bytes Str) )
  .child-stdin-write ( Bytes AnyUInt  (Result Unit Str) )
  .child-stdin-close ( AnyUInt  )
  .child-stdout-read ( AnyInt AnyUInt  (Result Bytes Str) )
  .child-stderr-read ( AnyInt AnyUInt  (Result Bytes Str) )
Description

Process effect — spawn, wait, kill, and pipe data through child processes. Handles are carried as AnyUInt identifiers in this placeholder decl.

Parent chain:IOProcess

Operations

.spawn-process ( Str (Result AnyUInt Str) )

Spawn a new child process from a program path and return its handle.

.wait ( AnyUInt (Result AnyInt Str) )

Wait for a child process to exit; returns the numeric exit code.

.kill ( AnyUInt (Result Unit Str) )

Signal a child process to terminate.

.run ( Str (Result Bytes Str) )

Convenience: spawn, wait, and collect the child's stdout.

.child-stdin-write ( Bytes AnyUInt (Result Unit Str) )

Write bytes to the child's stdin pipe.

.child-stdin-close ( AnyUInt )

Close the child's stdin pipe (EOF).

.child-stdout-read ( AnyInt AnyUInt (Result Bytes Str) )

Read up to n bytes from the child's stdout pipe.

.child-stderr-read ( AnyInt AnyUInt (Result Bytes Str) )

Read up to n bytes from the child's stderr pipe.