summaryrefslogtreecommitdiffstats
path: root/piper.c
diff options
context:
space:
mode:
Diffstat (limited to 'piper.c')
-rw-r--r--piper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/piper.c b/piper.c
index aa18ab9..1e951f8 100644
--- a/piper.c
+++ b/piper.c
@@ -265,10 +265,11 @@ main(int argc, char **argv)
procs[0]._stderr = fds[1];
procs[1]._stdin = fds[0];
- while (!terminate) {
+ while (!terminate || have_child()) {
pid_t pid;
- start_missing_procs();
+ if (!terminate)
+ start_missing_procs();
if (sendsignal != 0)
signal_procs();