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:
2cfa886
)
core: fix error checking for PR_SET_CHILD_SUBREAPER
author
Lennart Poettering
<lennart@poettering.net>
Tue, 21 Aug 2012 14:47:14 +0000
(16:47 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 21 Aug 2012 14:48:02 +0000
(16:48 +0200)
src/core/main.c
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index cdd77c1ad92c56d2a60cdbda0265949603acf5e8..6e8f21a290b33d50017cf33c6056226dbbf6fa5b 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-1509,11
+1509,11
@@
int main(int argc, char *argv[]) {
if (arg_running_as == MANAGER_USER) {
/* Become reaper of our children */
if (arg_running_as == MANAGER_USER) {
/* Become reaper of our children */
- r = prctl(PR_SET_CHILD_SUBREAPER, 1);
- if (r < 0)
- log_error("Failed to prctl(PR_SET_CHILD_SUBREAPER): %s", strerror(-r));
- if (r == -EINVAL)
- log_error("Perhaps the kernel version is too old (< 3.4?)");
+ if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) {
+ log_warning("Failed to make us a subreaper: %m");
+ if (errno == EINVAL)
+ log_info("Perhaps the kernel version is too old (< 3.3?)");
+ }
}
r = manager_new(arg_running_as, &m);
}
r = manager_new(arg_running_as, &m);