diff options
author | Matt Kraai | 2001-05-02 21:48:17 +0000 |
---|---|---|
committer | Matt Kraai | 2001-05-02 21:48:17 +0000 |
commit | 80abc45182ff8a526968d199add198f979875c77 (patch) | |
tree | da6cf3cde215f3616ffd65d3e5ee77471ef4cc68 /hush.c | |
parent | adcbc12d85b91929b73f3897bff7d1559aa39c51 (diff) | |
download | busybox-80abc45182ff8a526968d199add198f979875c77.zip busybox-80abc45182ff8a526968d199add198f979875c77.tar.gz |
Move up waitpid error check so that errno isn't clobbered by tcsetpgrp.
Diffstat (limited to 'hush.c')
-rw-r--r-- | hush.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |