aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hush.c6
-rw-r--r--shell/hush.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/hush.c b/hush.c
index 4a16a3fa6..a7316f82e 100644
--- a/hush.c
+++ b/hush.c
@@ -1148,12 +1148,12 @@ static void checkjobs()
}
}
+ if (childpid == -1 && errno != ECHILD)
+ perror_msg("waitpid");
+
/* move the shell to the foreground */
if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY)
perror_msg("tcsetpgrp");
-
- if (childpid == -1 && errno != ECHILD)
- perror_msg("waitpid");
}
/* run_pipe_real() starts all the jobs, but doesn't wait for anything
diff --git a/shell/hush.c b/shell/hush.c
index 4a16a3fa6..a7316f82e 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1148,12 +1148,12 @@ static void checkjobs()
}
}
+ if (childpid == -1 && errno != ECHILD)
+ perror_msg("waitpid");
+
/* move the shell to the foreground */
if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY)
perror_msg("tcsetpgrp");
-
- if (childpid == -1 && errno != ECHILD)
- perror_msg("waitpid");
}
/* run_pipe_real() starts all the jobs, but doesn't wait for anything