diff options
author | trociny <trociny@FreeBSD.org> | 2014-01-17 21:45:25 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2014-01-17 21:45:25 +0000 |
commit | f2d92b6efc726472fe466650a3d4afcee1f148bb (patch) | |
tree | d86ef850a12e33e6eb6ea8747c6ae89890d52b68 /usr.bin | |
parent | 82a7c1437d7fdb1955c512f3c342e3ccd7eb209d (diff) | |
download | FreeBSD-src-f2d92b6efc726472fe466650a3d4afcee1f148bb.zip FreeBSD-src-f2d92b6efc726472fe466650a3d4afcee1f148bb.tar.gz |
Bring back r226403, the fix for bin/161526, which was (accidentally?)
reverted in r238896.
PR: bin/161526
Reported by: Karli.Sjoberg slu.se
MFC after: 3 days
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/script/script.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 1396d3d..72814fb 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -238,12 +238,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; } |