From b0d6b85720f6176837afef60ca5c199d5a391c82 Mon Sep 17 00:00:00 2001 From: Wolfgang Richter Date: Wed, 19 Mar 2014 22:45:48 -0400 Subject: [PATCH] script: time from end of read() call partially fixes #58 --- term-utils/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.47.3