Date: Tue, 28 Oct 2008 06:00:13 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184389 - head/lib/libutil Message-ID: <200810280600.m9S60Dn9084121@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810280600.m9S60Dn9084121>