From owner-cvs-src-old@FreeBSD.ORG Sun Oct 26 21:55:51 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE4C51065699 for ; Sun, 26 Oct 2008 21:55:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BAFA98FC0A for ; Sun, 26 Oct 2008 21:55:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QLtpX8061452 for ; Sun, 26 Oct 2008 21:55:51 GMT (envelope-from ed@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9QLtpgO061451 for cvs-src-old@freebsd.org; Sun, 26 Oct 2008 21:55:51 GMT (envelope-from ed@repoman.freebsd.org) Message-Id: <200810262155.m9QLtpgO061451@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ed@repoman.freebsd.org using -f From: Ed Schouten Date: Sun, 26 Oct 2008 21:55:19 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/lib/libc/stdlib grantpt.3 grantpt.c src/lib/libutil pty.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 21:55:51 -0000 ed 2008-10-26 21:55:19 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) lib/libc/stdlib grantpt.3 grantpt.c lib/libutil pty.c Log: SVN rev 184300 on 2008-10-26 21:55:19Z by ed MFC r183565: Small cleanups to openpty(). - Pass O_NOCTTY to posix_openpt(2). This makes the implementation work consistently on implementations that make the PTY the controlling TTY by default. - Call unlockpt() before opening the slave device. POSIX mentions that de slave device should only be opened after grantpt() and unlockpt() have been called. - Replace some redundant code by a label. As a safety net, add a call to revoke() to unlockpt(). All applications out there use openpty(), explicitly call revoke() or implement their own PTY allocation routines. Adding the call to unlockpt() won't hurt, but will prevent foot-shooting. Reviewed by: jhb, kib Approved by: re Revision Changes Path 1.3.20.1 +0 -5 src/lib/libc/stdlib/grantpt.3 1.7.2.6 +10 -4 src/lib/libc/stdlib/grantpt.c 1.17.2.4 +15 -23 src/lib/libutil/pty.c