]> err.no Git - systemd/commitdiff
shutdown: properly handle sigtimedwait() timing out
authorLennart Poettering <lennart@poettering.net>
Tue, 26 Oct 2010 18:51:15 +0000 (20:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Oct 2010 18:51:15 +0000 (20:51 +0200)
src/shutdown.c

index bd4b69bbe373c2094b46866f3ffb9bd41d5f4480..e8d250179296302ff8687c0cc78511d08c01da1b 100644 (file)
@@ -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: