summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_close.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2002-08-29 23:06:07 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2002-08-29 23:06:07 +0000
commitd8b5986dd6a718d948b9ea0e2da3256ac45bff42 (patch)
tree24c4da9130c487d85f113d7fdfa44a22f470cb61 /lib/libpthread/thread/thr_close.c
parentee92a1ab51e1543706ad3802c5d218b04df5e0ba (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_close.c')
-rw-r--r--lib/libpthread/thread/thr_close.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_close.c b/lib/libpthread/thread/thr_close.c
index 0a5bd24fa418..22c939440ddc 100644
--- a/lib/libpthread/thread/thr_close.c
+++ b/lib/libpthread/thread/thr_close.c
@@ -82,7 +82,8 @@ _close(int fd)
* using, which would then cause any reads to block
* indefinitely.
*/
- if ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode)) && (_thread_fd_table[fd]->flags & O_NONBLOCK) == 0) {
+ if ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode))
+ && (_thread_fd_getflags(fd) & O_NONBLOCK) == 0) {
/* Get the current flags: */
flags = __sys_fcntl(fd, F_GETFL, NULL);
/* Clear the nonblocking file descriptor flag: */