commit c4153df6202b944f947b018d6e461170a3a1168e
Author: Jan Klemkow <[email protected]>
AuthorDate: Tue Apr 14 21:49:51 2020 +0200
Commit: Jan Klemkow <[email protected]>
CommitDate: Tue Apr 14 21:50:20 2020 +0200
explicit continue on EOF while read vom child, plus comment
diff --git a/scroll.c b/scroll.c
index ae7588f..b3946c7 100644
--- a/scroll.c
+++ b/scroll.c
@@ -508,6 +508,8 @@ main(int argc, char *argv[])
if (n == -1 && errno != EINTR)
die("read:");
+ if (n == 0) /* on exit of child we continue here */
+ continue; /* let signal handler catch SIGCHLD */
if (write(STDOUT_FILENO, input, n) == -1)
die("write:");