diff options
author | ghelmer <ghelmer@FreeBSD.org> | 2000-06-09 19:38:28 +0000 |
---|---|---|
committer | ghelmer <ghelmer@FreeBSD.org> | 2000-06-09 19:38:28 +0000 |
commit | 2b59ff22ecb89b2925da4bf4753ca602940ebc61 (patch) | |
tree | 81858160d789de5590710dba2336ca01a0714b1b /usr.bin/wall | |
parent | 413a2b37bd141d96bf28eabe340ead9946647512 (diff) | |
download | FreeBSD-src-2b59ff22ecb89b2925da4bf4753ca602940ebc61.zip FreeBSD-src-2b59ff22ecb89b2925da4bf4753ca602940ebc61.tar.gz |
O_NONBLOCK was used as a command with a bogus arg to fcntl(2).
Change it to F_SETFD with an arg of 0 to clear O_NONBLOCK.
PR: bin/8681
Submitted by: koyama takahiro <tah@d1.dion.ne.jp>
Prompted by: Nathan Ahlstrom <nrahlstr@winternet.com>
Diffstat (limited to 'usr.bin/wall')
-rw-r--r-- | usr.bin/wall/ttymsg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c index 2b58a1b..a42ef41 100644 --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -120,7 +120,7 @@ ttymsg(iov, iovcnt, line, tmout) continue; } if (errno == EWOULDBLOCK) { - int cpid, off = 0; + int cpid; if (forked) { (void) close(fd); @@ -143,7 +143,7 @@ ttymsg(iov, iovcnt, line, tmout) (void) signal(SIGTERM, SIG_DFL); /* XXX */ (void) sigsetmask(0); (void) alarm((u_int)tmout); - (void) fcntl(fd, O_NONBLOCK, &off); + (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ continue; } /* |