Type Sigaction [src]

Renamed from sigaction to Sigaction to avoid conflict with function name.

Members

Source

pub const Sigaction = switch (native_os) { .linux => switch (native_arch) { .mips, .mipsel, .mips64, .mips64el, => if (builtin.target.abi.isMusl()) linux.Sigaction else if (builtin.target.ptrBitWidth() == 64) extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; flags: c_uint, handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, mask: sigset_t, restorer: ?*const fn () callconv(.c) void = null, } else extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; flags: c_uint, handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, mask: sigset_t, restorer: ?*const fn () callconv(.c) void = null, __resv: [1]c_int = .{0}, }, .s390x => if (builtin.abi == .gnu) extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, __glibc_reserved0: c_int = 0, flags: c_uint, restorer: ?*const fn () callconv(.c) void = null, mask: sigset_t, } else linux.Sigaction, else => linux.Sigaction, }, .emscripten => emscripten.Sigaction, .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, mask: sigset_t, flags: c_uint, }, .dragonfly, .freebsd => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; /// signal handler handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, /// see signal options flags: c_uint, /// signal mask to apply mask: sigset_t, }, .solaris, .illumos => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; /// signal options flags: c_uint, /// signal handler handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, /// signal mask to apply mask: sigset_t, }, .haiku => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; /// signal handler handler: extern union { handler: handler_fn, sigaction: sigaction_fn, }, /// signal mask to apply mask: sigset_t, /// see signal options flags: i32, /// will be passed to the signal handler, BeOS extension userdata: *allowzero anyopaque = undefined, }, .openbsd => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.c) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.c) void; /// signal handler handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, /// signal mask to apply mask: sigset_t, /// signal options flags: c_uint, }, // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L39-L46 .serenity => extern struct { pub const handler_fn = *align(1) const fn (c_int) callconv(.c) void; pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*anyopaque) callconv(.c) void; handler: extern union { handler: ?handler_fn, sigaction: ?sigaction_fn, }, mask: sigset_t, flags: c_int, }, else => void, }