diff options
Diffstat (limited to 'sysdeps/mach/hurd/open.c')
-rw-r--r-- | sysdeps/mach/hurd/open.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/open.c b/sysdeps/mach/hurd/open.c index ec74a83b0f..c2c4e284c2 100644 --- a/sysdeps/mach/hurd/open.c +++ b/sysdeps/mach/hurd/open.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <hurd.h> #include <hurd/fd.h> +#include <sysdep-cancel.h> /* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG, a third argument is the file protection. */ @@ -29,6 +30,7 @@ __libc_open (const char *file, int oflag, ...) { mode_t mode; io_t port; + int cancel_oldtype; if (__OPEN_NEEDS_MODE (oflag)) { @@ -40,7 +42,10 @@ __libc_open (const char *file, int oflag, ...) else mode = 0; + cancel_oldtype = LIBC_CANCEL_ASYNC(); port = __file_name_lookup (file, oflag, mode); + LIBC_CANCEL_RESET (cancel_oldtype); + if (port == MACH_PORT_NULL) return -1; |