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 libuv/libuv#4.
This commit is contained in:
parent
39a5728dd9
commit
b705b53edd
@ -21,6 +21,7 @@
|
||||
|
||||
#include "linux-syscalls.h"
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
@ -298,7 +299,7 @@ int uv__epoll_pwait(int epfd,
|
||||
nevents,
|
||||
timeout,
|
||||
sigmask,
|
||||
sizeof(*sigmask));
|
||||
_NSIG / 8);
|
||||
#else
|
||||
return errno = ENOSYS, -1;
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user