aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/openat.c')
-rw-r--r--sysdeps/mach/hurd/openat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/openat.c b/sysdeps/mach/hurd/openat.c
index 7e241cd..5842da0 100644
--- a/sysdeps/mach/hurd/openat.c
+++ b/sysdeps/mach/hurd/openat.c
@@ -24,6 +24,7 @@
#include <sys/stat.h>
#include <hurd.h>
#include <hurd/fd.h>
+#include <sysdep-cancel.h>
/* Open FILE with access OFLAG. Interpret relative paths relative to
the directory associated with FD. If O_CREAT or O_TMPFILE is in OFLAG, a
@@ -33,6 +34,7 @@ __openat (int fd, const char *file, int oflag, ...)
{
mode_t mode;
io_t port;
+ int cancel_oldtype;
if (__OPEN_NEEDS_MODE (oflag))
{
@@ -44,7 +46,10 @@ __openat (int fd, const char *file, int oflag, ...)
else
mode = 0;
+ cancel_oldtype = LIBC_CANCEL_ASYNC();
port = __file_name_lookup_at (fd, 0, file, oflag, mode);
+ LIBC_CANCEL_RESET (cancel_oldtype);
+
if (port == MACH_PORT_NULL)
return -1;