commit 2305d5784b406861eee529f3eb4b075526dac40c from: Omar Polo date: Sat Aug 07 20:28:09 2021 UTC handle EAGAIN commit - d41deb935181aa31b5aec732ed6f4e9b3baaec67 commit + 2305d5784b406861eee529f3eb4b075526dac40c blob - b65fced40d6ccc60aa3670e37065b2718bc50979 blob + bece9fc43fd8e5dbd173576254f9ecac1845f8da --- script.c +++ script.c @@ -102,8 +102,11 @@ check_for_output(void) return; for (;;) { - if ((r = read(child_out, buf, sizeof(buf))) == -1) + if ((r = read(child_out, buf, sizeof(buf))) == -1) { + if (errno == EAGAIN) + break; fatal("read"); + } if (r == 0) break; before_printing();