about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2021-04-03 21:16:41 -0400
committerRich Felker <dalias@aerifal.cx>2021-04-03 21:16:41 -0400
commit2c00f95c1ac7dd50f53d9e361847ebd2513c8da0 (patch)
treef9a3db77297900989a8684b2e3a69fc83e029879 /src
parent521b4d27a00b12b238b3d4284a2c490daf851ab1 (diff)
downloadmusl-2c00f95c1ac7dd50f53d9e361847ebd2513c8da0.tar.gz
musl-2c00f95c1ac7dd50f53d9e361847ebd2513c8da0.tar.xz
musl-2c00f95c1ac7dd50f53d9e361847ebd2513c8da0.zip
make epoll_[p]wait a cancellation point
this is a Linux-specific function and not covered by POSIX's
requirements for which interfaces are cancellation points, but glibc
makes it one and existing software relies on it being one.

at some point a review for similar functions that should be made
cancellation points should be done.
Diffstat (limited to 'src')
-rw-r--r--src/linux/epoll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/epoll.c b/src/linux/epoll.c
index deff5b10..93baa814 100644
--- a/src/linux/epoll.c
+++ b/src/linux/epoll.c
@@ -24,9 +24,9 @@ int epoll_ctl(int fd, int op, int fd2, struct epoll_event *ev)
 
 int epoll_pwait(int fd, struct epoll_event *ev, int cnt, int to, const sigset_t *sigs)
 {
-	int r = __syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8);
+	int r = __syscall_cp(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8);
 #ifdef SYS_epoll_wait
-	if (r==-ENOSYS && !sigs) r = __syscall(SYS_epoll_wait, fd, ev, cnt, to);
+	if (r==-ENOSYS && !sigs) r = __syscall_cp(SYS_epoll_wait, fd, ev, cnt, to);
 #endif
 	return __syscall_ret(r);
 }