From owner-freebsd-bugs@FreeBSD.ORG Thu Oct 16 12:40:17 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BB4B16A4BF for ; Thu, 16 Oct 2003 12:40:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B402743FAF for ; Thu, 16 Oct 2003 12:40:16 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9GJeGFY003511 for ; Thu, 16 Oct 2003 12:40:16 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9GJeG9Y003510; Thu, 16 Oct 2003 12:40:16 -0700 (PDT) (envelope-from gnats) Date: Thu, 16 Oct 2003 12:40:16 -0700 (PDT) Message-Id: <200310161940.h9GJeG9Y003510@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Colin Percival Subject: Re: bin/56166: /usr/bin/script exits prematurely if STDIN is closed X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Colin Percival List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2003 19:40:17 -0000 The following reply was made to PR bin/56166; it has been noted by GNATS. From: Colin Percival To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/56166: /usr/bin/script exits prematurely if STDIN is closed Date: Thu, 16 Oct 2003 20:32:23 +0100 Improved patch: --- script.diff begins here --- --- script.c.orig Thu Jul 20 11:35:21 2000 +++ script.c Thu Oct 16 20:25:20 2003 @@ -162,7 +162,8 @@ FD_ZERO(&rfd); for (;;) { FD_SET(master, &rfd); - FD_SET(STDIN_FILENO, &rfd); + if (argv[0] == NULL) + FD_SET(STDIN_FILENO, &rfd); if (flushtime > 0) { tv.tv_sec = flushtime; tv.tv_usec = 0; --- script.diff ends here ---