From: Wolfgang Richter Date: Thu, 20 Mar 2014 02:45:48 +0000 (-0400) Subject: script: time from end of read() call partially fixes #58 X-Git-Tag: v2.25-rc1~393^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0d6b85720f6176837afef60ca5c199d5a391c82;p=thirdparty%2Futil-linux.git script: time from end of read() call partially fixes #58 --- diff --git a/term-utils/script.c b/term-utils/script.c index 456958b609..e5d239c9b8 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -422,13 +422,14 @@ dooutput(void) { if (poll(fds, 1, 50) <= 0) break; } - if (tflg) - gettimeofday(&tv, NULL); errno = 0; cc = read(master, obuf, sizeof (obuf)); errsv = errno; + if (tflg) + gettimeofday(&tv, NULL); + if (errsv == EINTR && cc <= 0) continue; /* try it again */ if (cc <= 0)