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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61464
@ -120,7 +120,7 @@ ttymsg(iov, iovcnt, line, tmout)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (errno == EWOULDBLOCK) {
|
if (errno == EWOULDBLOCK) {
|
||||||
int cpid, off = 0;
|
int cpid;
|
||||||
|
|
||||||
if (forked) {
|
if (forked) {
|
||||||
(void) close(fd);
|
(void) close(fd);
|
||||||
@ -143,7 +143,7 @@ ttymsg(iov, iovcnt, line, tmout)
|
|||||||
(void) signal(SIGTERM, SIG_DFL); /* XXX */
|
(void) signal(SIGTERM, SIG_DFL); /* XXX */
|
||||||
(void) sigsetmask(0);
|
(void) sigsetmask(0);
|
||||||
(void) alarm((u_int)tmout);
|
(void) alarm((u_int)tmout);
|
||||||
(void) fcntl(fd, O_NONBLOCK, &off);
|
(void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user