566 |
#ifdef SIGPIPE |
#ifdef SIGPIPE |
567 |
if (sig != SIGPIPE) |
if (sig != SIGPIPE) |
568 |
#endif /* SIGPIPE */ |
#endif /* SIGPIPE */ |
|
{ |
|
569 |
error (0, 0, _("%s: %s%s"), |
error (0, 0, _("%s: %s%s"), |
570 |
p->commands[i]->name, |
p->commands[i]->name, |
571 |
xstrsignal (sig), |
xstrsignal (sig), |
572 |
WCOREDUMP (status) ? |
WCOREDUMP (status) ? |
573 |
" (core dumped)" : |
" (core dumped)" : |
574 |
""); |
""); |
575 |
ret |= 2; |
} else if (!WIFEXITED (status)) |
|
} |
|
|
} else if (WIFEXITED (status)) { |
|
|
int exit_status = WEXITSTATUS (status); |
|
|
|
|
|
if (exit_status == |
|
|
EXEC_FAILED_EXIT_STATUS) |
|
|
ret |= 4; |
|
|
else if (exit_status != 0) |
|
|
ret |= 1; |
|
|
} else |
|
576 |
error (0, 0, "unexpected status %d", |
error (0, 0, "unexpected status %d", |
577 |
status); |
status); |
578 |
|
|
579 |
|
if (i == p->ncommands - 1) |
580 |
|
ret = status; |
581 |
|
|
582 |
break; |
break; |
583 |
} |
} |
584 |
} |
} |