authorgravatar for pat.github@tullmann.orgPat Tullmann <pat.github@tullmann.org> 2025-04-08 14:03:31-07:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-10 10:49:04+02:00
log2a7683933a0304d3cfc051f7299d7d7cbf7c0042
treec6a5da148621bdbe846c2bcc19132f071cb4ca37
parent83e1ce1e00ec04c4311307adc809a1a86b874b05
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

linux.zig: epoll_wait: pass kernel sigset size

Linux kernel syscalls expect to be given the number of bits of sigset that they're built for, not the full 1024-bit sigsets that glibc supports. I audited the other syscalls in here that use `sigset_t` and they're all using `NSIG / 8`. Fixes #12715

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+1-1
...@@ -2221,7 +2221,7 @@ pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeou...@@ -2221,7 +2221,7 @@ pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeou
2221 @as(usize, @intCast(maxevents)),2221 @as(usize, @intCast(maxevents)),
2222 @as(usize, @bitCast(@as(isize, timeout))),2222 @as(usize, @bitCast(@as(isize, timeout))),
2223 @intFromPtr(sigmask),2223 @intFromPtr(sigmask),
2224 @sizeOf(sigset_t),2224 NSIG / 8,
2225 );2225 );
2226}2226}
22272227