diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-26 20:51:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-26 20:51:15 +0200 |
commit | 415dbd2e542e7a0f6b15350e1c5fd00dca54b91d (patch) | |
tree | 4357ac4befea47509936cd973fe37000ff71bf89 /src/shutdown.c | |
parent | 57b63f363ffeed8556da11eab395f902adcefd5b (diff) |
shutdown: properly handle sigtimedwait() timing out
Diffstat (limited to 'src/shutdown.c')
-rw-r--r-- | src/shutdown.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shutdown.c b/src/shutdown.c index bd4b69bbe3..e8d2501792 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: |