summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2014-01-20 20:33:40 +0000
committertrociny <trociny@FreeBSD.org>2014-01-20 20:33:40 +0000
commitf4854f7fc494bfec161e2cf4449c6b8b0d95930f (patch)
tree0220cdf80cbebf4a7a45deacd9e5d3fad40516f0 /usr.bin
parent1f607ed1d18c35c3567e76e73ab36d7febd0ff6e (diff)
downloadFreeBSD-src-f4854f7fc494bfec161e2cf4449c6b8b0d95930f.zip
FreeBSD-src-f4854f7fc494bfec161e2cf4449c6b8b0d95930f.tar.gz
MFC r260833:
Bring back r226403, the fix for bin/161526, which was (accidentally?) reverted in r238896. PR: bin/161526 Reported by: Karli.Sjoberg slu.se
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/script/script.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 515a10e..4e5e313 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -235,12 +235,15 @@ main(int argc, char *argv[])
FD_SET(master, &rfd);
if (readstdin)
FD_SET(STDIN_FILENO, &rfd);
- if ((!readstdin && ttyflg) || flushtime > 0) {
- tv.tv_sec = !readstdin && ttyflg ? 1 :
- flushtime - (tvec - start);
+ if (!readstdin && ttyflg) {
+ tv.tv_sec = 1;
tv.tv_usec = 0;
tvp = &tv;
readstdin = 1;
+ } else if (flushtime > 0) {
+ tv.tv_sec = flushtime - (tvec - start);
+ tv.tv_usec = 0;
+ tvp = &tv;
} else {
tvp = NULL;
}
OpenPOWER on IntegriCloud