Skip to content

Commit

Permalink
Merge pull request #108 from AkihiroSuda/a
Browse files Browse the repository at this point in the history
fix WIFEXITED regression
  • Loading branch information
AkihiroSuda authored Jul 25, 2019
2 parents 85efff0 + bb45d23 commit 8a52d60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,13 @@ int main(int argc, char *const argv[])
ret = waitpid(child_pid, &child_wstatus, 0);
while (ret < 0 && errno == EINTR);
if (ret < 0) {
fprintf(stderr, "waitpid failed\n");
perror("waitpid");
exit_status = EXIT_FAILURE;
goto finish;
}
if (!WIFEXITED(child_wstatus)) {
fprintf(stderr, "child failed(wstatus=%d, !WIFEXITED)\n",
child_wstatus);
exit_status = EXIT_FAILURE;
goto finish;
}
Expand Down

0 comments on commit 8a52d60

Please sign in to comment.