(sendmail_send_message): Failing waitpid is
not an error if errno==ECHILD (the calling program might have ignored SIGCHLD).
Showing
1 changed file
with
5 additions
and
0 deletions
... | @@ -441,11 +441,16 @@ sendmail_send_message (mu_mailer_t mailer, mu_message_t msg, mu_address_t from, | ... | @@ -441,11 +441,16 @@ sendmail_send_message (mu_mailer_t mailer, mu_message_t msg, mu_address_t from, |
441 | 441 | ||
442 | if (rc < 0) | 442 | if (rc < 0) |
443 | { | 443 | { |
444 | if (errno == ECHILD) | ||
445 | status = 0; | ||
446 | else | ||
447 | { | ||
444 | status = errno; | 448 | status = errno; |
445 | MAILER_DEBUG2 (mailer, MU_DEBUG_TRACE, | 449 | MAILER_DEBUG2 (mailer, MU_DEBUG_TRACE, |
446 | "waitpid(%d) failed: %s\n", | 450 | "waitpid(%d) failed: %s\n", |
447 | sendmail->pid, strerror (status)); | 451 | sendmail->pid, strerror (status)); |
448 | } | 452 | } |
453 | } | ||
449 | else if (WIFEXITED (exit_status)) | 454 | else if (WIFEXITED (exit_status)) |
450 | { | 455 | { |
451 | exit_status = WEXITSTATUS (exit_status); | 456 | exit_status = WEXITSTATUS (exit_status); | ... | ... |
-
Please register or sign in to post a comment