Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

LibCStdlib

Terminates the process through the target C abort path.

Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →

Module std.libc.stdlib

import std.libc.stdlib;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

<

pub fn<.C> abort() -> never;

Terminates the process through the target C abort path.

The call raises the host SIGABRT path, may execute a foreign installed signal handler, does not guarantee stdio flushing, and never returns to Sn.

Return: No value because successful invocation never returns. Pre: Safety: there is no declaration-specific pointer, bounds, alignment, provenance, lifetime, ownership, aliasing, or concurrency obligation. Pre: Safety: the selected libc matches the no-argument C ABI, its process runtime is callable, and no foreign unwind crosses into Sn. Warning: Terminates every process thread without Sn unwind, defer, or automatic deinitialization and may bypass ordinary foreign cleanup.

Example

module example.abort;
from std.libc.stdlib import abort;
fn FatalNow() -> never {
    unsafe {
        abort();
    }
}
fn Main() -> i32 { return 0; }
Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library