From owner-svn-src-stable-8@FreeBSD.ORG Thu Mar 25 08:33:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81CC31065674; Thu, 25 Mar 2010 08:33:57 +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 701828FC1B; Thu, 25 Mar 2010 08:33:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2P8XvwD022454; Thu, 25 Mar 2010 08:33:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2P8XvXR022451; Thu, 25 Mar 2010 08:33:57 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201003250833.o2P8XvXR022451@svn.freebsd.org> From: Ed Schouten Date: Thu, 25 Mar 2010 08:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205635 - stable/8/usr.bin/script X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2010 08:33:57 -0000 Author: ed Date: Thu Mar 25 08:33:56 2010 New Revision: 205635 URL: http://svn.freebsd.org/changeset/base/205635 Log: MFC r205008 and 205009: Make script(1) a little less broken. Close the file descriptor to the TTY. There is no reason why the parent process should keep track of the descriptor. This ensures that the application inside properly drains the TTY during exit(2). Reported by: alfred Modified: stable/8/usr.bin/script/script.c Directory Properties: stable/8/usr.bin/script/ (props changed) Modified: stable/8/usr.bin/script/script.c ============================================================================== --- stable/8/usr.bin/script/script.c Thu Mar 25 02:14:04 2010 (r205634) +++ stable/8/usr.bin/script/script.c Thu Mar 25 08:33:56 2010 (r205635) @@ -158,6 +158,7 @@ main(int argc, char *argv[]) } if (child == 0) doshell(argv); + close(slave); if (flushtime > 0) tvp = &tv;