Browse Source

explicit continue on EOF while read vom child, plus comment

Jan Klemkow 5 years ago
parent
commit
c4153df620
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scroll.c

+ 2 - 0
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:");