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>
This commit is contained in:
parent
24f8e0e948
commit
7111b0acef
@ -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;
|
||||
}
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user