zig
zig copied to clipboard
Proposal (std): add interfacing support for `sigsuspend` syscall
There's currently no std mapping for the sigsuspend(sig:) syscall (POSIX.1-2008).
int sigsuspend(const sigset_t *sigmask);
Even though std.c.sigwait(set:, sig:) exists and does roughly the same wanted behaviour, it requires you to link libc and it's only available in std.c because it's a libc call. Similar syscalls (in particular sigaction(signum:, act:, oldact:)) are in the posix/linux/c interfaces.
Proposed change is adding support for sigsuspend(sig:) to std.posix, std.os.linux and std.c.
Is there a reason why sigsuspend was omitted from the posix syscall interface? I'll offer to implement it if there are no drawbacks
I don't see any particular reason why we wouldn't want this.