Expand description
Execute commands while continuously draining both process pipes.
Structs§
- Execution
Result - Command execution result.
- Process
Handle - Non-blocking process handle. Pipe readers run immediately after spawning.
Constants§
- DEFAULT_
KILL_ AFTER - Time a process group may keep running after
terminatebeforeSIGKILL. - DEFAULT_
PIPE_ DRAIN - Time the pipes may stay open after the wrapper shell exited.
Functions§
- execute_
command - Execute a command, or return the command without spawning in dry-run mode.
- execute_
detached - Start a detached command with all standard streams disconnected, in its
own process group (JS
spawn(..., { detached: true })). - is_
process_ group_ alive - Whether any process in the group led by
pgidis alive. - normalize_
exit - Exit code and signal of a status; a signal becomes 128 + N.
- setup_
signal_ handler - Register a Ctrl+C cleanup callback in the current Tokio runtime. Calling the returned function unregisters it without running cleanup.
- signal_
from_ exit_ code - Signal named by a shell exit code of 128 + N (
137isSIGKILL). - signal_
name - Name of a signal number (
9isSIGKILL). - start_
command - Start a command and drain stdout/stderr concurrently, with optional console output.
Type Aliases§
- Cleanup
Fn - Signal cleanup callback.