⌂ Modules nupp nupp.io nupp.io.process nupp.io.process.spi nupp.io.process.spi
Implementation interface for process transports.
Importing this declaration starts no child. Every operation receives the retained provider table as its first argument. Options, Exit, and Interest use the canonical declarations in nupp.io.process.types.
Spawn returns the child owner, optional stdin/stdout/stderr handles, process ID, and optional failure message. Pipes and process lifetime are separate resources: closeStream releases a pipe, while reap releases the child owner after settlement. Construct exit results with nupp.io.process.types.exited so callers receive the shared identity and timeout/killed semantics.
Readiness probes must distinguish pending input from EOF and backpressure from a closed pipe. waitReady services the requested read/write interests and child completion for a bounded interval; now supplies its monotonic millisecond clock. Process cleanup must remain valid after cancellation, kill, and partial spawn.
Types
Providerinterface
Members Name Kind Description priorityfield spawnmethod Returns child, stdin, stdout, stderr, pid, and error in that order. pollmethod Returns the canonical Exit once available, or nil while the child runs. killmethod Requests termination; the boolean chooses forced termination. readmethod Reads at most the requested byte count. writemethod Returns accepted bytes and whether the pipe is gone. closeStreammethod Releases one pipe handle; repeated release must be harmless. reapmethod Releases the settled child owner; repeated release must be harmless. nowmethod Returns monotonic milliseconds for process deadlines. waitReadymethod Waits for the Interest read/write sets or child completion up to the requested millisecond interval, returning the...
spawnmethod
spawn : function ( Provider , Options ) : ( any ? , any ? , any ? , any ? , integer , string ? )
@readonly
Returns child, stdin, stdout, stderr, pid, and error in that order. Absent or inherited pipes have nil handles; failure has no child owner.
Arguments
Returns Type Description any ? any ? any ? any ? integer string ?
pollmethod
@readonly
Returns the canonical Exit once available, or nil while the child runs.
Arguments
Returns
killmethod
kill : function ( Provider , any , boolean ) : nil
@readonly
Requests termination; the boolean chooses forced termination. The child still requires settlement and reap.
Arguments Name Type Description ?Provider ?any ?boolean
Returns
readmethod
@readonly
Reads at most the requested byte count. An empty string means pending; nil means EOF. Report transport failures by raising.
Arguments Name Type Description ?Provider ?any ?integer
Returns
writemethod
@readonly
Returns accepted bytes and whether the pipe is gone. Zero bytes with false means backpressure; true means the pipe is closed.
Arguments
Returns Type Description integer boolean
closeStreammethod
closeStream : function ( Provider , any ) : ( boolean , string ? )
@readonly
Releases one pipe handle; repeated release must be harmless.
Arguments
Returns Type Description boolean string ?
reapmethod
reap : function ( Provider , any ) : ( boolean , string ? )
@readonly
Releases the settled child owner; repeated release must be harmless.
Arguments
Returns Type Description boolean string ?
nowmethod
@readonly
Returns monotonic milliseconds for process deadlines.
Arguments
Returns
waitReadymethod
waitReady : function ( Provider , Interest , number ) : integer
@readonly
Waits for the Interest read/write sets or child completion up to the requested millisecond interval, returning the number of ready interests.
Arguments Name Type Description ?Provider ?Interest ?number
Returns
← Previous nupp.io.process Next → nupp.io.tls