diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-14 17:09:59 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-06-14 17:11:22 +0000 |
commit | 0c46891442c0b4ca593691f62ad1213e022ff00b (patch) | |
tree | 1e17d559dbb26fff30ea05b3166ec8463abac587 /sysdeps/mach/hurd/sendmsg.c | |
parent | 45fce058fe7c9a14800a10564a7bc1970f4c7c49 (diff) | |
download | glibc-0c46891442c0b4ca593691f62ad1213e022ff00b.tar.gz glibc-0c46891442c0b4ca593691f62ad1213e022ff00b.tar.xz glibc-0c46891442c0b4ca593691f62ad1213e022ff00b.zip |
hurd: Make send* cancellation points
* sysdeps/mach/hurd/send.c (__send): Make the __socket_send call a cancellation point. * sysdeps/mach/hurd/sendto.c (__sendto): Likewise. * sysdeps/mach/hurd/sendmsg.c (__libc_sendmsg): Likewise.
Diffstat (limited to 'sysdeps/mach/hurd/sendmsg.c')
-rw-r--r-- | sysdeps/mach/hurd/sendmsg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c index dfc5afd4c6..37ab7f3ce0 100644 --- a/sysdeps/mach/hurd/sendmsg.c +++ b/sysdeps/mach/hurd/sendmsg.c @@ -24,6 +24,7 @@ #include <hurd/fd.h> #include <hurd/ifsock.h> #include <hurd/socket.h> +#include <sysdep-cancel.h> #include "hurd/hurdsocket.h" /* Send a message described MESSAGE on socket FD. @@ -184,6 +185,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) if (! err) { /* Send the data. */ + int cancel_oldtype = LIBC_CANCEL_ASYNC(); err = __socket_send (port, aport, flags, data.ptr, len, ports, @@ -192,6 +194,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) message->msg_control, message->msg_controllen, &amount); + LIBC_CANCEL_RESET (cancel_oldtype); __mach_port_deallocate (__mach_task_self (), aport); } |