From owner-cvs-src-old@FreeBSD.ORG Mon Oct 27 05:28:36 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 B1F3F1065675 for ; Mon, 27 Oct 2008 05:28:36 +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 9D2008FC1D for ; Mon, 27 Oct 2008 05:28:36 +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 m9R5SaV5040890 for ; Mon, 27 Oct 2008 05:28:36 GMT (envelope-from ed@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9R5SaN6040889 for cvs-src-old@freebsd.org; Mon, 27 Oct 2008 05:28:36 GMT (envelope-from ed@repoman.freebsd.org) Message-Id: <200810270528.m9R5SaN6040889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ed@repoman.freebsd.org using -f From: Ed Schouten Date: Mon, 27 Oct 2008 05:28:08 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_6_4 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: Mon, 27 Oct 2008 05:28:36 -0000 ed 2008-10-27 05:28:08 UTC FreeBSD src repository Modified files: (Branch: RELENG_6_4) lib/libc/stdlib grantpt.3 grantpt.c lib/libutil pty.c Log: SVN rev 184322 on 2008-10-27 05:28:08Z 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.26.2 +0 -5 src/lib/libc/stdlib/grantpt.3 1.4.2.3.2.2 +10 -4 src/lib/libc/stdlib/grantpt.c 1.15.10.2.2.2 +15 -23 src/lib/libutil/pty.c