Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

RunOptions

Public Struct
std.process.RunOptions
pub const RunOptions = struct

Fields

argv: []const []const u8
stderr_limit: Io.Limit = .unlimited
stdout_limit: Io.Limit = .unlimited
reserve_amount: usize = 64

How many bytes to initially allocate for stderr and stdout.

cwd: Child.Cwd = .inherit

Set to change the current working directory when spawning the child process.

environ_map: ?*const Environ.Map = null

Replaces the child environment when provided. The PATH value from here is not used to resolve argv[0]; that resolution always uses parent environment.

expand_arg0: ArgExpansion = .no_expand
progress_node: std.Progress.Node = std.Progress.Node.none

When populated, a pipe will be created for the child process to communicate progress back to the parent. The file descriptor of the write end of the pipe will be specified in the ZIG_PROGRESS environment variable inside the child process. The progress reported by the child will be attached to this progress node in the parent process.

The child's progress tree will be grafted into the parent's progress tree, by substituting this node with the child's root node.

create_no_window: bool = true

Windows-only. Sets the CREATE_NO_WINDOW flag in CreateProcess.

disable_aslr: bool = false

Darwin-only. Disable ASLR for the child process.

timeout: Io.Timeout = .none

File

process.zig:467
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
pub const RunOptions = struct {
    argv: []const []const u8,
    stderr_limit: Io.Limit = .unlimited,
    stdout_limit: Io.Limit = .unlimited,
    /// How many bytes to initially allocate for stderr and stdout.
    reserve_amount: usize = 64,

    /// Set to change the current working directory when spawning the child process.
    cwd: Child.Cwd = .inherit,
    /// Replaces the child environment when provided. The PATH value from here
    /// is not used to resolve `argv[0]`; that resolution always uses parent
    /// environment.
    environ_map: ?*const Environ.Map = null,
    expand_arg0: ArgExpansion = .no_expand,
    /// When populated, a pipe will be created for the child process to
    /// communicate progress back to the parent. The file descriptor of the
    /// write end of the pipe will be specified in the `ZIG_PROGRESS`
    /// environment variable inside the child process. The progress reported by
    /// the child will be attached to this progress node in the parent process.
    ///
    /// The child's progress tree will be grafted into the parent's progress tree,
    /// by substituting this node with the child's root node.
    progress_node: std.Progress.Node = std.Progress.Node.none,
    /// Windows-only. Sets the CREATE_NO_WINDOW flag in CreateProcess.
    create_no_window: bool = true,
    /// Darwin-only. Disable ASLR for the child process.
    disable_aslr: bool = false,
    timeout: Io.Timeout = .none,
}