Skip to content

Commit b705b53

Browse files
committed
linux: fix sigmask size arg in epoll_pwait() call
sizeof(sigset_t) = 128 whereas the kernel expects 8, the size of a long. It made the system call fail with EINVAL when a non-NULL sigset was passed in. Fortunately, it's academic because there is just one call site and it passes in NULL. Fixes #4.
1 parent 39a5728 commit b705b53

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/unix/linux-syscalls.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "linux-syscalls.h"
2323
#include <unistd.h>
24+
#include <signal.h>
2425
#include <sys/syscall.h>
2526
#include <sys/types.h>
2627
#include <errno.h>
@@ -298,7 +299,7 @@ int uv__epoll_pwait(int epfd,
298299
nevents,
299300
timeout,
300301
sigmask,
301-
sizeof(*sigmask));
302+
_NSIG / 8);
302303
#else
303304
return errno = ENOSYS, -1;
304305
#endif

0 commit comments

Comments
 (0)