zig icon indicating copy to clipboard operation
zig copied to clipboard

Proposal (std): add interfacing support for `sigsuspend` syscall

Open QSmally opened this issue 7 months ago • 1 comments

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

QSmally avatar May 24 '25 12:05 QSmally

I don't see any particular reason why we wouldn't want this.

alexrp avatar May 28 '25 12:05 alexrp