DoxigAlpha

Child

Fields of this type

Fields

#
id:Id
Available after calling `spawn()`.
thread_handle:if (native_os == .windows) windows.HANDLE else void
allocator:mem.Allocator
stdin:?File
The writing end of the child process's standard input pipe.
stdout:?File
The reading end of the child process's standard output pipe.
stderr:?File
The reading end of the child process's standard error pipe.
term:?(SpawnError!Term)
Terminated state of the child process.
argv:[]const []const u8
env_map:?*const EnvMap
Leave as null to use the current env map using the supplied allocator.
uid:if (native_os == .windows or native_os == .wasi) void else ?posix.uid_t
Set to change the user id when spawning the child process.
gid:if (native_os == .windows or native_os == .wasi) void else ?posix.gid_t
Set to change the group id when spawning the child process.
pgid:if (native_os == .windows or native_os == .wasi) void else ?posix.pid_t
Set to change the process group id when spawning the child process.
cwd:?[]const u8
Set to change the current working directory when spawning the child process.
cwd_dir:?fs.Dir
Set to change the current working directory when spawning the child process.
err_pipe:if (native_os == .windows) void else ?posix.fd_t
disable_aslr:bool
Darwin-only.
start_suspended:bool
Darwin and Windows only.
create_no_window:bool
Windows-only.
request_resource_usage_statistics:bool
Set to true to obtain rusage information for the child process.
resource_usage_statistics:ResourceUsageStatistics
This is available after calling wait if
progress_node:std.Progress.Node
When populated, a pipe will be created for the child process to

Type definitions in this namespace

Types

#
StdIo
Behavior of the child process's standard input, output, and error
WindowsExtension
File name extensions supported natively by `CreateProcess()` on Windows.

First argument in argv is the executable.

Functions

#
init
First argument in argv is the executable.
spawn
On success must call `kill` or `wait`.
kill
Forcibly terminates child process and then cleans up all resources.
waitForSpawn
On some targets, `spawn` may not report all spawn errors, such as `error.InvalidExe`.
wait
Blocks until child process terminates and then cleans up all resources.
collectOutput
Collect the output from the process's stdout and stderr.
run
Spawns a child process, waits for it, collecting stdout and stderr, and then returns.

Error sets in this namespace

Error Sets

#