Function wait4 [src]

Prototype

pub fn wait4(pid: pid_t, flags: u32, ru: ?*rusage) WaitPidResult

Parameters

pid: pid_tflags: u32ru: ?*rusage

Source

pub fn wait4(pid: pid_t, flags: u32, ru: ?*rusage) WaitPidResult { var status: if (builtin.link_libc) c_int else u32 = undefined; while (true) { const rc = system.wait4(pid, &status, @intCast(flags), ru); switch (errno(rc)) { .SUCCESS => return .{ .pid = @intCast(rc), .status = @bitCast(status), }, .INTR => continue, .CHILD => unreachable, // The process specified does not exist. It would be a race condition to handle this error. .INVAL => unreachable, // Invalid flags. else => unreachable, } } }