Skip to content

Commit 991560f

Browse files
rootbeeralexrp
authored andcommitted
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 parent f4e3631 commit 991560f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/os/linux.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,7 @@ pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeou
22422242
@as(usize, @intCast(maxevents)),
22432243
@as(usize, @bitCast(@as(isize, timeout))),
22442244
@intFromPtr(sigmask),
2245-
@sizeOf(sigset_t),
2245+
NSIG / 8,
22462246
);
22472247
}
22482248

0 commit comments

Comments
 (0)