summaryrefslogtreecommitdiff
path: root/src/execline/forstdin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/execline/forstdin.c')
-rw-r--r--src/execline/forstdin.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/execline/forstdin.c b/src/execline/forstdin.c
index 1e9d5e6..3fb52eb 100644
--- a/src/execline/forstdin.c
+++ b/src/execline/forstdin.c
@@ -147,11 +147,11 @@ int main (int argc, char const **argv, char const *const *envp)
stralloc_free(&modif) ;
}
if (pids.s)
- {
- if (sig_restore(SIGCHLD) < 0)
- strerr_diefu2sys(111, "restore", " SIGCHLD handler") ;
- if (!waitn(genalloc_s(pid_t, &pids), genalloc_len(pid_t, &pids)))
- strerr_diefu1sys(111, "waitn") ;
- }
+ for (;;)
+ {
+ sig_block(SIGCHLD) ;
+ if (!pids.len) break ;
+ sig_pause() ;
+ }
return 0 ;
}