- if (WIFSIGNALED(err)) {
- fprintf(stderr, "%s: ERROR: Child process died due to signal %d: `%s'\n",
- __FUNCTION__, WTERMSIG(err), cmd);
- return -1;
- }
+ if (WIFSIGNALED(status)) {
+ error_msg("%s: %s: Child killed by signal %d\n",
+ __FUNCTION__, argv[0], WTERMSIG(status));
+ return -1;
+ }