function Command.arg
function Command.args
function Command.current_dir
function Command.env
function Command.process_group
Assign the command to process group
group.
On Unix, 0 starts the command as the leader of a new process group.
Cancelling a grouped child’s token, or calling [Child.kill],
reaches every process in the group, not just the child. This setting
has no effect on Windows.
function Command.spawn
Executes the command as a child process, returning a handle to it.
By default, stdin, stdout and stderr are inherited from the parent.
The child is bound to
cancellation, ctx.cancellation.root unless
given: when that token is cancelled (Ctrl+C for the root) the child is
sent a terminate signal, to its whole process group if it leads one,
and killed three seconds later if it is still running. Bind to
ctx.cancellation.new() to keep a child out of that and stop it
yourself. A child spawned from a post-task hook or ctx.defer after
a cancel is cleanup, not part of what was cancelled: without an
explicit token it gets one of its own and runs to completion.
function Command.status
Executes a command as a child process, waiting for it to finish and collecting its status.
By default, stdin, stdout and stderr are inherited from the parent.
The child is bound to
cancellation as in [spawn], and the wait
ends the task if the root is cancelled meanwhile.
function Command.stderr
Configuration for the child process’s standard error (stderr) handle.
Defaults to [
inherit] when used with [spawn] or [status], and
defaults to [piped] when used with [output].
Accepts the same values as [stdout].
function Command.stdin
Configuration for the child process’s standard input (stdin) handle.
Defaults to [
inherit] when used with [spawn] or [status], and
defaults to [piped] when used with [output].
function Command.stdout
Configuration for the child process’s standard output (stdout) handle.
Defaults to [
inherit] when used with [spawn] or [status], and
defaults to [piped] when used with [output].
Accepts the strings "null", "piped", "inherit", or a writable file
stream from fs.create(...) to redirect output straight to that file —
letting a caller poll the child’s liveness with try_wait and read the
file afterwards instead of draining a pipe with wait_with_output.
