From owner-svn-src-head@FreeBSD.ORG Tue Oct 28 06:00:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C97DB1065673; Tue, 28 Oct 2008 06:00:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7C618FC14; Tue, 28 Oct 2008 06:00:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S60Dqn084122; Tue, 28 Oct 2008 06:00:13 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S60Dn9084121; Tue, 28 Oct 2008 06:00:13 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810280600.m9S60Dn9084121@svn.freebsd.org> From: Ed Schouten Date: Tue, 28 Oct 2008 06:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184389 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 06:00:13 -0000 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 #include #include -#include 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;