svn commit: r184389 - head/lib/libutil

Ed Schouten ed at FreeBSD.org
Mon Oct 27 23:00:13 PDT 2008


Author: ed
Date: Tue Oct 28 06:00:13 2008
New Revision: 184389
URL: http://svn.freebsd.org/changeset/base/184389

Log:
  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

Modified:
  head/lib/libutil/pty.c

Modified: head/lib/libutil/pty.c
==============================================================================
--- head/lib/libutil/pty.c	Tue Oct 28 05:50:28 2008	(r184388)
+++ head/lib/libutil/pty.c	Tue Oct 28 06:00:13 2008	(r184389)
@@ -47,7 +47,6 @@ static char sccsid[] = "@(#)pty.c	8.3 (B
 #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 
 	if (slavename == NULL)
 		goto bad;
 
-	if (revoke(slavename) == -1)
-		goto bad;
-
 	slave = open(slavename, O_RDWR);
 	if (slave == -1)
 		goto bad;


More information about the svn-src-all mailing list