diff options
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() | |||
1148 | } | 1148 | } |
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | if (childpid == -1 && errno != ECHILD) | ||
1152 | perror_msg("waitpid"); | ||
1153 | |||
1151 | /* move the shell to the foreground */ | 1154 | /* move the shell to the foreground */ |
1152 | if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY) | 1155 | if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY) |
1153 | perror_msg("tcsetpgrp"); | 1156 | perror_msg("tcsetpgrp"); |
1154 | |||
1155 | if (childpid == -1 && errno != ECHILD) | ||
1156 | perror_msg("waitpid"); | ||
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | /* run_pipe_real() starts all the jobs, but doesn't wait for anything | 1159 | /* run_pipe_real() starts all the jobs, but doesn't wait for anything |