Zig 0.17.0-dev (Split by item) 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.
std › Io › Dispatch › execvPath Private Function execvPath Doc Source Private Function std.Io.Dispatch.execvPath
fn execvPath (
ev : *Evented ,
path : [*:0 ]const u8 ,
child_argv : [*:null ]const ?[*:0 ]const u8 ,
env_block : process .Environ .PosixBlock ,
) process .ReplaceError Params ev : *Evented path : [*:0 ]const u8 child_argv : [*:null ]const ?[*:0 ]const u8 env_block : process .Environ .PosixBlock File Io/Dispatch.zig: 4538
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566 fn execvPath (
ev : *Evented ,
path : [*:0 ]const u8 ,
child_argv : [*:null ]const ?[*:0 ]const u8 ,
env_block : process .Environ .PosixBlock ,
) process .ReplaceError {
_ = ev ;
switch (c .errno (c .execve (path , child_argv , env_block .slice .ptr ))) {
.FAULT => |err | return errnoBug (err ), // Bad pointer parameter.
.@"2BIG" => return error .SystemResources ,
.MFILE => return error .ProcessFdQuotaExceeded ,
.NAMETOOLONG => return error .NameTooLong ,
.NFILE => return error .SystemFdQuotaExceeded ,
.NOMEM => return error .SystemResources ,
.ACCES => return error .AccessDenied ,
.PERM => return error .PermissionDenied ,
.INVAL => return error .InvalidExe ,
.NOEXEC => return error .InvalidExe ,
.IO => return error .FileSystem ,
.LOOP => return error .FileSystem ,
.ISDIR => return error .IsDir ,
.NOENT => return error .FileNotFound ,
.NOTDIR => return error .NotDir ,
.TXTBSY => return error .FileBusy ,
.BADEXEC => return error .InvalidExe ,
.BADARCH => return error .InvalidExe ,
else => |err | return unexpectedErrno (err ),
}
}
This function ignores PATH environment variable.