summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-21 16:47:14 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-21 16:48:02 +0200
commit8b8ffe6828c97c82870cfd30c647fa269964810f (patch)
tree081fd625bf776256cc64c77cee3076388580bbe2 /src/core/main.c
parent2cfa886eb1c664c58f7bc19109fd5f17ea48a4ee (diff)
core: fix error checking for PR_SET_CHILD_SUBREAPER
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/main.c b/src/core/main.c
index cdd77c1ad9..6e8f21a290 100644
--- 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 */
- 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);