From 2521297ed1e6809bd4caea23741050ea8b8a22a8 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 28 Oct 2008 06:00:13 +0000 Subject: Remove unneeded call to revoke() inside openpty(). As discussed on the commits list, there is no need to call revoke() inside openpty(). On RELENG_6 and RELENG_7 unlockpt() will call revoke(). On HEAD we create pseudo-terminals on demand, so there is no need to revoke the slave device node. This change should never be MFC'd, because the implementation we have in RELENG_6 and RELENG_7 should work flawlessly with older versions of libc. Discussed with: jhb MFC after: never --- lib/libutil/pty.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/libutil') diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c index 6513fd3..c60d250 100644 --- a/lib/libutil/pty.c +++ b/lib/libutil/pty.c @@ -47,7 +47,6 @@ static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94"; #include #include #include -#include int openpty(int *amaster, int *aslave, char *name, struct termios *termp, @@ -70,9 +69,6 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp, if (slavename == NULL) goto bad; - if (revoke(slavename) == -1) - goto bad; - slave = open(slavename, O_RDWR); if (slave == -1) goto bad; -- cgit v1.1