diff options
Diffstat (limited to 'lib/libkse/thread/thr_close.c')
-rw-r--r-- | lib/libkse/thread/thr_close.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_close.c b/lib/libkse/thread/thr_close.c index 0a5bd24..22c9394 100644 --- a/lib/libkse/thread/thr_close.c +++ b/lib/libkse/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: */ |