From: Lennart Poettering Date: Tue, 26 Oct 2010 18:51:15 +0000 (+0200) Subject: shutdown: properly handle sigtimedwait() timing out X-Git-Tag: v12~145 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=415dbd2e542e7a0f6b15350e1c5fd00dca54b91d;p=systemd shutdown: properly handle sigtimedwait() timing out --- diff --git a/src/shutdown.c b/src/shutdown.c index bd4b69bb..e8d25017 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -140,7 +140,8 @@ static int send_signal(int sign) { timespec_store(&ts, until - n); if (sigtimedwait(&mask, NULL, &ts) != SIGCHLD) - log_warning("Failed: sigtimedwait did not return SIGCHLD: %m"); + if (errno != EAGAIN) + log_warning("Failed: sigtimedwait did not return SIGCHLD: %m"); } finish: @@ -189,7 +190,8 @@ static int rescue_send_signal(int sign) { timespec_store(&ts, until - n); if (sigtimedwait(&mask, NULL, &ts) != SIGCHLD) - log_warning("Failed: sigtimedwait did not return SIGCHLD: %m"); + if (errno != EAGAIN) + log_warning("Failed: sigtimedwait did not return SIGCHLD: %m"); } finish: