From 61fee9038f4e364a779f4b722249f6c3ac3fd87c Mon Sep 17 00:00:00 2001 From: billf Date: Sat, 10 Mar 2001 10:39:52 +0000 Subject: 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. --- lib/libutil/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c index 0b5e4ab..60ca6ed 100644 --- a/lib/libutil/pty.c +++ b/lib/libutil/pty.c @@ -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); -- cgit v1.1