chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57b63f3
)
shutdown: properly handle sigtimedwait() timing out
author
Lennart Poettering
<lennart@poettering.net>
Tue, 26 Oct 2010 18:51:15 +0000
(20:51 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 26 Oct 2010 18:51:15 +0000
(20:51 +0200)
src/shutdown.c
patch
|
blob
|
history
diff --git
a/src/shutdown.c
b/src/shutdown.c
index bd4b69bbe373c2094b46866f3ffb9bd41d5f4480..e8d250179296302ff8687c0cc78511d08c01da1b 100644
(file)
--- 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)
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:
}
finish:
@@
-189,7
+190,8
@@
static int rescue_send_signal(int sign) {
timespec_store(&ts, until - n);
if (sigtimedwait(&mask, NULL, &ts) != SIGCHLD)
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:
}
finish: