summaryrefslogtreecommitdiff
path: root/lib/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libutil')
-rw-r--r--lib/libutil/pty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c
index fa2c1cadfbd..b88424defcf 100644
--- a/lib/libutil/pty.c
+++ b/lib/libutil/pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pty.c,v 1.3 1996/06/17 07:46:05 downsj Exp $ */
+/* $OpenBSD: pty.c,v 1.4 1996/06/29 18:44:17 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/* from: static char sccsid[] = "@(#)pty.c 8.1 (Berkeley) 6/4/93"; */
-static char *rcsid = "$Id: pty.c,v 1.3 1996/06/17 07:46:05 downsj Exp $";
+static char *rcsid = "$Id: pty.c,v 1.4 1996/06/29 18:44:17 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
@@ -79,6 +79,7 @@ openpty(amaster, aslave, name, termp, winp)
line[8] = *cp1;
for (cp2 = "0123456789abcdef"; *cp2; cp2++) {
line[9] = *cp2;
+ line[5] = 'p';
if ((master = open(line, O_RDWR, 0)) == -1) {
if (errno == ENOENT)
return (-1); /* out of ptys */
@@ -101,7 +102,6 @@ openpty(amaster, aslave, name, termp, winp)
return (0);
}
(void) close(master);
- line[5] = 'p';
}
}
}