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/sendto.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/sendto.c')
-rw-r--r-- | sysdeps/mach/hurd/sendto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/sendto.c b/sysdeps/mach/hurd/sendto.c index 2f26b36b9e..a5faf8ea2e 100644 --- a/sysdeps/mach/hurd/sendto.c +++ b/sysdeps/mach/hurd/sendto.c @@ -22,6 +22,7 @@ #include <hurd/fd.h> #include <hurd/ifsock.h> #include <hurd/socket.h> +#include <sysdep-cancel.h> #include "hurd/hurdsocket.h" /* Send N bytes of BUF on socket FD to peer at address ADDR (which is @@ -82,11 +83,13 @@ __sendto (int fd, if (! err) { /* Send the data. */ + int cancel_oldtype = LIBC_CANCEL_ASYNC(); err = __socket_send (port, aport, flags, buf, n, NULL, MACH_MSG_TYPE_COPY_SEND, 0, NULL, 0, &wrote); + LIBC_CANCEL_RESET (cancel_oldtype); } err; })); |