Date: Thu, 16 Oct 2003 12:40:16 -0700 (PDT) From: Colin Percival <colin.percival@wadham.ox.ac.uk> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/56166: /usr/bin/script exits prematurely if STDIN is closed Message-ID: <200310161940.h9GJeG9Y003510@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/56166; it has been noted by GNATS. From: Colin Percival <colin.percival@wadham.ox.ac.uk> 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 ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310161940.h9GJeG9Y003510>