bin/56166: /usr/bin/script exits prematurely if STDIN is
closed
Colin Percival
colin.percival at wadham.ox.ac.uk
Thu Oct 16 12:40:17 PDT 2003
The following reply was made to PR bin/56166; it has been noted by GNATS.
From: Colin Percival <colin.percival at wadham.ox.ac.uk>
To: freebsd-gnats-submit at 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 ---
More information about the freebsd-bugs
mailing list