script: time from end of read() call partially fixes #58

This commit is contained in:
Wolfgang Richter 2014-03-19 22:45:48 -04:00
parent 422f93bfbb
commit b0d6b85720
1 changed files with 3 additions and 2 deletions

View File

@ -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)