explicit continue on EOF while read vom child, plus comment - scroll - scrollba… | |
git clone git://git.suckless.org/scroll | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c4153df6202b944f947b018d6e461170a3a1168e | |
parent 5f5cc69f25ef12b45d24311d06b7e9da371f3a8c | |
Author: Jan Klemkow <[email protected]> | |
Date: Tue, 14 Apr 2020 21:49:51 +0200 | |
explicit continue on EOF while read vom child, plus comment | |
Diffstat: | |
M scroll.c | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git 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 her… | |
+ continue; /* let signal handler catch SIGCHLD … | |
if (write(STDOUT_FILENO, input, n) == -1) | |
die("write:"); |