[systemd-commits] src/shutdown.c

Lennart Poettering lennart at kemper.freedesktop.org
Tue Oct 26 11:51:22 PDT 2010


 src/shutdown.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 415dbd2e542e7a0f6b15350e1c5fd00dca54b91d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 26 20:51:15 2010 +0200

    shutdown: properly handle sigtimedwait() timing out

diff --git a/src/shutdown.c b/src/shutdown.c
index bd4b69b..e8d2501 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:



More information about the systemd-commits mailing list