diff options
author | ed <ed@FreeBSD.org> | 2008-10-28 06:00:13 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-10-28 06:00:13 +0000 |
commit | 2521297ed1e6809bd4caea23741050ea8b8a22a8 (patch) | |
tree | 758fd8713e69f7a4ead0de797f8c91de0ad937c0 /lib | |
parent | 8630f6d5149e10897f4d3300eebf68fb47ef80e0 (diff) | |
download | FreeBSD-src-2521297ed1e6809bd4caea23741050ea8b8a22a8.zip FreeBSD-src-2521297ed1e6809bd4caea23741050ea8b8a22a8.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/pty.c | 4 |
1 files changed, 0 insertions, 4 deletions
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 <stdlib.h> #include <string.h> #include <termios.h> -#include <unistd.h> 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; |