In theory it would be perfectly legal for a system administrator to
# cd /dev && ./MAKEDEV pty0 pty3 and/or # rm -rf /dev/ptyp0 and expect all programs that use openpty() to still try to find available ptys.
This commit is contained in:
parent
eae526b021
commit
f6f1b6b676
@ -77,7 +77,7 @@ openpty(amaster, aslave, name, termp, winp)
|
||||
line[9] = *cp2;
|
||||
if ((master = open(line, O_RDWR, 0)) == -1) {
|
||||
if (errno == ENOENT)
|
||||
return (-1); /* out of ptys */
|
||||
break; /* try the next pty group */
|
||||
} else {
|
||||
line[5] = 't';
|
||||
(void) chown(line, getuid(), ttygid);
|
||||
|
Loading…
Reference in New Issue
Block a user