diff options
author | Julian Elischer <julian@FreeBSD.org> | 1996-08-20 08:22:01 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 1996-08-20 08:22:01 +0000 |
commit | 0f7d684755aefbcfd70b45d24efc2d39bc505c4c (patch) | |
tree | b14348030d1048f8628b798374a8a061a990aae3 /lib/libpthread/thread/thr_open.c | |
parent | 1bbb22c82e47dbc805e523be5e2fe3d4436761e0 (diff) |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_open.c')
-rw-r--r-- | lib/libpthread/thread/thr_open.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libpthread/thread/thr_open.c b/lib/libpthread/thread/thr_open.c index ead651ea3d9ed..00bb91335755b 100644 --- a/lib/libpthread/thread/thr_open.c +++ b/lib/libpthread/thread/thr_open.c @@ -31,6 +31,7 @@ * */ #include <stdarg.h> +#include <unistd.h> #include <fcntl.h> #include <dirent.h> #ifdef _THREAD_SAFE @@ -55,8 +56,8 @@ open(const char *path, int flags,...) mode = va_arg(ap, int); va_end(ap); } - /* Open the file, forcing it to use non-blocking I/O operations: */ - if ((fd = _thread_sys_open(path, flags | O_NONBLOCK, mode)) < 0) { + /* Open the file: */ + if ((fd = _thread_sys_open(path, flags, mode)) < 0) { } /* Initialise the file descriptor table entry: */ else if (_thread_fd_table_init(fd) != 0) { @@ -65,12 +66,6 @@ open(const char *path, int flags,...) /* Reset the file descriptor: */ fd = -1; - } else { - /* - * Save the file open flags so that they can be checked - * later: - */ - _thread_fd_table[fd]->flags = flags; } /* Unblock signals: */ |