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 Function

cleanExit

Public Function
std.process.cleanExit
pub fn cleanExit(io: Io) void

Indicate intent to terminate with a successful exit code.

In debug builds, this is a no-op, so that the calling code's cleanup mechanisms are tested and so that external tools checking for resource leaks can be accurate. In release builds, this calls exit with code zero, and does not return.

Params

File

process.zig:646
646
647
648
649
650
pub fn cleanExit(io: Io) void {
    if (builtin.mode == .debug) return;
    _ = io.lockStderr(&.{}, .no_color) catch {};
    exit(0);
}