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:
Ben Noordhuis 2014-11-25 01:48:56 +01:00
parent 39a5728dd9
commit b705b53edd

View File

@ -21,6 +21,7 @@
#include "linux-syscalls.h" #include "linux-syscalls.h"
#include <unistd.h> #include <unistd.h>
#include <signal.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/types.h> #include <sys/types.h>
#include <errno.h> #include <errno.h>
@ -298,7 +299,7 @@ int uv__epoll_pwait(int epfd,
nevents, nevents,
timeout, timeout,
sigmask, sigmask,
sizeof(*sigmask)); _NSIG / 8);
#else #else
return errno = ENOSYS, -1; return errno = ENOSYS, -1;
#endif #endif