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 library itself.

kill

Requests for the operating system to forcibly terminate the child process, then blocks until it terminates, then cleans up all resources.

Idempotent and does nothing after wait returns.

Uncancelable. Ignores unexpected errors from the operating system.

Child.kill
pub fn kill(child: *Child, io: Io) void

File

lib/std/process/Child.zig:134

Code

pub fn kill(child: *Child, io: Io) void {
    if (child.id == null) {
        assert(child.stdin == null);
        assert(child.stdout == null);
        assert(child.stderr == null);
        return;
    }
    io.vtable.childKill(io.userdata, child);
    assert(child.id == null);
}