diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-02-25 23:50:51 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-02-25 23:50:51 +0000 |
commit | ed794375b4795220a7e7de8f2e22c15d505ac46b (patch) | |
tree | d6ea4d0b9c965fb0fb6d59a3f4ffd6d263e9c167 /libc/stdio | |
parent | 4ba08b4526af9a222f409a12aaf45c0aa0beb904 (diff) | |
download | uClibc-alpine-ed794375b4795220a7e7de8f2e22c15d505ac46b.tar.bz2 uClibc-alpine-ed794375b4795220a7e7de8f2e22c15d505ac46b.tar.xz |
I shouldn't try to program when sleepy, since I totally botched
the fcntl interface...
-Erik
Diffstat (limited to 'libc/stdio')
-rw-r--r-- | libc/stdio/stdio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c index 63fb6bd00..6389d9ffc 100644 --- a/libc/stdio/stdio.c +++ b/libc/stdio/stdio.c @@ -203,11 +203,11 @@ void __stdio_flush_buffers(void) if (WRITEABLE(fp)) { /* Set the underlying fd to non-block mode to ensure * that calls to _exit() and abort() will not block */ - long flags; - fcntl(fp->fd, F_GETFL, &flags); - fcntl(fp->fd, F_SETFL, flags|O_NONBLOCK); + int opts; + opts = fcntl(fp->fd, F_GETFL); + fcntl(fp->fd, F_SETFL, opts|O_NONBLOCK); fflush(fp); - fcntl(fp->fd, F_SETFL, flags); + fcntl(fp->fd, F_SETFL, opts); } } } |