]> git.pld-linux.org Git - packages/systemd.git/commitdiff
- applied upstream
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 28 May 2012 09:22:10 +0000 (09:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ReleaseSession.patch -> 1.2
    control-subcgroup.patch -> 1.2

ReleaseSession.patch [deleted file]
control-subcgroup.patch [deleted file]

diff --git a/ReleaseSession.patch b/ReleaseSession.patch
deleted file mode 100644 (file)
index d91a421..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-From 75c8e3cffd7da8eede614cf61384957af2c82a29 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Thu, 22 Mar 2012 01:06:40 +0000
-Subject: logind: close FIFO before ending sessions cleanly
-
-For clean session endings ask logind explicitly to get rid of the FIFO
-before closing it so that the FIFO logic doesn't result in su/sudo to be
-terminated immediately.
----
-diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
-index d8f4d89..ea6b89f 100644
---- a/src/login/logind-dbus.c
-+++ b/src/login/logind-dbus.c
-@@ -80,6 +80,9 @@
-         "   <arg name=\"seat\" type=\"s\" direction=\"out\"/>\n"        \
-         "   <arg name=\"vtnr\" type=\"u\" direction=\"out\"/>\n"        \
-         "  </method>\n"                                                 \
-+        "  <method name=\"ReleaseSession\">\n"                          \
-+        "   <arg name=\"id\" type=\"s\" direction=\"in\"/>\n"           \
-+        "  </method>\n"                                                 \
-         "  <method name=\"ActivateSession\">\n"                         \
-         "   <arg name=\"id\" type=\"s\" direction=\"in\"/>\n"           \
-         "  </method>\n"                                                 \
-@@ -1075,6 +1078,33 @@ static DBusHandlerResult manager_message_handler(
-                 if (r < 0)
-                         return bus_send_error_reply(connection, message, &error, r);
-+        } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ReleaseSession")) {
-+                const char *name;
-+                Session *session;
-+
-+                if (!dbus_message_get_args(
-+                                    message,
-+                                    &error,
-+                                    DBUS_TYPE_STRING, &name,
-+                                    DBUS_TYPE_INVALID))
-+                        return bus_send_error_reply(connection, message, &error, -EINVAL);
-+
-+                session = hashmap_get(m->sessions, name);
-+                if (!session)
-+                        return bus_send_error_reply(connection, message, &error, -ENOENT);
-+
-+                /* We use the FIFO to detect stray sessions where the
-+                process invoking PAM dies abnormally. We need to make
-+                sure that that process is not killed if at the clean
-+                end of the session it closes the FIFO. Hence, with
-+                this call explicitly turn off the FIFO logic, so that
-+                the PAM code can finish clean up on its own */
-+                session_remove_fifo(session);
-+
-+                reply = dbus_message_new_method_return(message);
-+                if (!reply)
-+                        goto oom;
-+
-         } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ActivateSession")) {
-                 const char *name;
-                 Session *session;
-diff --git a/src/login/pam-module.c b/src/login/pam-module.c
-index 8544413..4106d2b 100644
---- a/src/login/pam-module.c
-+++ b/src/login/pam-module.c
-@@ -414,7 +414,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
-                         "/org/freedesktop/login1",
-                         "org.freedesktop.login1.Manager",
-                         "CreateSession");
--
-         if (!m) {
-                 pam_syslog(handle, LOG_ERR, "Could not allocate create session message.");
-                 r = PAM_BUF_ERR;
-@@ -620,11 +619,77 @@ _public_ PAM_EXTERN int pam_sm_close_session(
-                 int argc, const char **argv) {
-         const void *p = NULL;
-+        const char *id;
-+        DBusConnection *bus = NULL;
-+        DBusMessage *m = NULL, *reply = NULL;
-+        DBusError error;
-+        int r;
--        pam_get_data(handle, "systemd.session-fd", &p);
-+        assert(handle);
-+
-+        dbus_error_init(&error);
-+
-+        id = pam_getenv(handle, "XDG_SESSION_ID");
-+        if (id) {
-+
-+                /* Before we go and close the FIFO we need to tell
-+                 * logind that this is a clean session shutdown, so
-+                 * that it doesn't just go and slaughter us
-+                 * immediately after closing the fd */
-+
-+                bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
-+                if (!bus) {
-+                        pam_syslog(handle, LOG_ERR, "Failed to connect to system bus: %s", bus_error_message(&error));
-+                        r = PAM_SESSION_ERR;
-+                        goto finish;
-+                }
-+
-+                m = dbus_message_new_method_call(
-+                                "org.freedesktop.login1",
-+                                "/org/freedesktop/login1",
-+                                "org.freedesktop.login1.Manager",
-+                                "ReleaseSession");
-+                if (!m) {
-+                        pam_syslog(handle, LOG_ERR, "Could not allocate release session message.");
-+                        r = PAM_BUF_ERR;
-+                        goto finish;
-+                }
-+
-+                if (!dbus_message_append_args(m,
-+                                              DBUS_TYPE_STRING, &id,
-+                                              DBUS_TYPE_INVALID)) {
-+                        pam_syslog(handle, LOG_ERR, "Could not attach parameters to message.");
-+                        r = PAM_BUF_ERR;
-+                        goto finish;
-+                }
-+                reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
-+                if (!reply) {
-+                        pam_syslog(handle, LOG_ERR, "Failed to release session: %s", bus_error_message(&error));
-+                        r = PAM_SESSION_ERR;
-+                        goto finish;
-+                }
-+        }
-+
-+        r = PAM_SUCCESS;
-+
-+finish:
-+        pam_get_data(handle, "systemd.session-fd", &p);
-         if (p)
-                 close_nointr(PTR_TO_INT(p) - 1);
--        return PAM_SUCCESS;
-+        dbus_error_free(&error);
-+
-+        if (bus) {
-+                dbus_connection_close(bus);
-+                dbus_connection_unref(bus);
-+        }
-+
-+        if (m)
-+                dbus_message_unref(m);
-+
-+        if (reply)
-+                dbus_message_unref(reply);
-+
-+        return r;
- }
---
-cgit v0.9.0.2-2-gbebe
diff --git a/control-subcgroup.patch b/control-subcgroup.patch
deleted file mode 100644 (file)
index 031daad..0000000
+++ /dev/null
@@ -1,561 +0,0 @@
-From ecedd90fcdf647f9a7b56b4934b65e30b2979b04 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Fri, 13 Apr 2012 21:24:47 +0000
-Subject: service: place control command in subcgroup control/
-
-Previously, we were brutally and onconditionally killing all processes
-in a service's cgroup before starting the service anew, in order to
-ensure that StartPre lines cannot be misused to spawn long-running
-processes.
-
-On logind-less systems this has the effect that restarting sshd
-necessarily calls all active ssh sessions, which is usually not
-desirable.
-
-With this patch control processes for a service are placed in a
-sub-cgroup called "control/". When starting a service anew we simply
-kill this cgroup, but not the main cgroup, in order to avoid killing any
-long-running non-control processes from previous runs.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=805942
----
-diff --git a/src/cgroup.c b/src/cgroup.c
-index ef9b02f..7a5f673 100644
---- a/src/cgroup.c
-+++ b/src/cgroup.c
-@@ -108,26 +108,43 @@ void cgroup_bonding_trim_list(CGroupBonding *first, bool delete_root) {
-                 cgroup_bonding_trim(b, delete_root);
- }
--int cgroup_bonding_install(CGroupBonding *b, pid_t pid) {
-+
-+int cgroup_bonding_install(CGroupBonding *b, pid_t pid, const char *cgroup_suffix) {
-+        char *p = NULL;
-+        const char *path;
-         int r;
-         assert(b);
-         assert(pid >= 0);
--        if ((r = cg_create_and_attach(b->controller, b->path, pid)) < 0)
-+        if (cgroup_suffix) {
-+                p = join(b->path, "/", cgroup_suffix, NULL);
-+                if (!p)
-+                        return -ENOMEM;
-+
-+                path = p;
-+        } else
-+                path = b->path;
-+
-+        r = cg_create_and_attach(b->controller, path, pid);
-+        free(p);
-+
-+        if (r < 0)
-                 return r;
-         b->realized = true;
-         return 0;
- }
--int cgroup_bonding_install_list(CGroupBonding *first, pid_t pid) {
-+int cgroup_bonding_install_list(CGroupBonding *first, pid_t pid, const char *cgroup_suffix) {
-         CGroupBonding *b;
-         int r;
--        LIST_FOREACH(by_unit, b, first)
--                if ((r = cgroup_bonding_install(b, pid)) < 0 && b->essential)
-+        LIST_FOREACH(by_unit, b, first) {
-+                r = cgroup_bonding_install(b, pid, cgroup_suffix);
-+                if (r < 0 && b->essential)
-                         return r;
-+        }
-         return 0;
- }
-@@ -176,7 +193,11 @@ int cgroup_bonding_set_task_access_list(CGroupBonding *first, mode_t mode, uid_t
-         return 0;
- }
--int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, Set *s) {
-+int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, Set *s, const char *cgroup_suffix) {
-+        char *p = NULL;
-+        const char *path;
-+        int r;
-+
-         assert(b);
-         assert(sig >= 0);
-@@ -184,10 +205,22 @@ int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, Set *s) {
-         if (!b->ours)
-                 return 0;
--        return cg_kill_recursive(b->controller, b->path, sig, sigcont, true, false, s);
-+        if (cgroup_suffix) {
-+                p = join(b->path, "/", cgroup_suffix, NULL);
-+                if (!p)
-+                        return -ENOMEM;
-+
-+                path = p;
-+        } else
-+                path = b->path;
-+
-+        r = cg_kill_recursive(b->controller, path, sig, sigcont, true, false, s);
-+        free(p);
-+
-+        return r;
- }
--int cgroup_bonding_kill_list(CGroupBonding *first, int sig, bool sigcont, Set *s) {
-+int cgroup_bonding_kill_list(CGroupBonding *first, int sig, bool sigcont, Set *s, const char *cgroup_suffix) {
-         CGroupBonding *b;
-         Set *allocated_set = NULL;
-         int ret = -EAGAIN, r;
-@@ -200,7 +233,8 @@ int cgroup_bonding_kill_list(CGroupBonding *first, int sig, bool sigcont, Set *s
-                         return -ENOMEM;
-         LIST_FOREACH(by_unit, b, first) {
--                if ((r = cgroup_bonding_kill(b, sig, sigcont, s)) < 0) {
-+                r = cgroup_bonding_kill(b, sig, sigcont, s, cgroup_suffix);
-+                if (r < 0) {
-                         if (r == -EAGAIN || r == -ESRCH)
-                                 continue;
-diff --git a/src/cgroup.h b/src/cgroup.h
-index de248fb..95f09e0 100644
---- a/src/cgroup.h
-+++ b/src/cgroup.h
-@@ -56,8 +56,8 @@ int cgroup_bonding_realize_list(CGroupBonding *first);
- void cgroup_bonding_free(CGroupBonding *b, bool trim);
- void cgroup_bonding_free_list(CGroupBonding *first, bool trim);
--int cgroup_bonding_install(CGroupBonding *b, pid_t pid);
--int cgroup_bonding_install_list(CGroupBonding *first, pid_t pid);
-+int cgroup_bonding_install(CGroupBonding *b, pid_t pid, const char *suffix);
-+int cgroup_bonding_install_list(CGroupBonding *first, pid_t pid, const char *suffix);
- int cgroup_bonding_set_group_access(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid);
- int cgroup_bonding_set_group_access_list(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid);
-@@ -65,8 +65,8 @@ int cgroup_bonding_set_group_access_list(CGroupBonding *b, mode_t mode, uid_t ui
- int cgroup_bonding_set_task_access(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid, int sticky);
- int cgroup_bonding_set_task_access_list(CGroupBonding *b, mode_t mode, uid_t uid, gid_t gid, int sticky);
--int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, Set *s);
--int cgroup_bonding_kill_list(CGroupBonding *first, int sig, bool sigcont, Set *s);
-+int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, Set *s, const char *suffix);
-+int cgroup_bonding_kill_list(CGroupBonding *first, int sig, bool sigcont, Set *s, const char *suffix);
- void cgroup_bonding_trim(CGroupBonding *first, bool delete_root);
- void cgroup_bonding_trim_list(CGroupBonding *first, bool delete_root);
-diff --git a/src/execute.c b/src/execute.c
-index 271c57f..c59f7e2 100644
---- a/src/execute.c
-+++ b/src/execute.c
-@@ -962,6 +962,7 @@ int exec_spawn(ExecCommand *command,
-                bool confirm_spawn,
-                CGroupBonding *cgroup_bondings,
-                CGroupAttribute *cgroup_attributes,
-+               const char *cgroup_suffix,
-                pid_t *ret) {
-         pid_t pid;
-@@ -1154,7 +1155,7 @@ int exec_spawn(ExecCommand *command,
-                 }
-                 if (cgroup_bondings) {
--                        err = cgroup_bonding_install_list(cgroup_bondings, 0);
-+                        err = cgroup_bonding_install_list(cgroup_bondings, 0, cgroup_suffix);
-                         if (err < 0) {
-                                 r = EXIT_CGROUP;
-                                 goto fail_child;
-@@ -1505,7 +1506,7 @@ int exec_spawn(ExecCommand *command,
-          * sure that when we kill the cgroup the process will be
-          * killed too). */
-         if (cgroup_bondings)
--                cgroup_bonding_install_list(cgroup_bondings, pid);
-+                cgroup_bonding_install_list(cgroup_bondings, pid, cgroup_suffix);
-         log_debug("Forked %s as %lu", command->path, (unsigned long) pid);
-diff --git a/src/execute.h b/src/execute.h
-index fc4c71e..428bb7c 100644
---- a/src/execute.h
-+++ b/src/execute.h
-@@ -192,6 +192,7 @@ int exec_spawn(ExecCommand *command,
-                bool confirm_spawn,
-                struct CGroupBonding *cgroup_bondings,
-                struct CGroupAttribute *cgroup_attributes,
-+               const char *cgroup_suffix,
-                pid_t *ret);
- void exec_command_done(ExecCommand *c);
-diff --git a/src/mount.c b/src/mount.c
-index 6c768a3..760ffcd 100644
---- a/src/mount.c
-+++ b/src/mount.c
-@@ -805,6 +805,7 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) {
-                             UNIT(m)->manager->confirm_spawn,
-                             UNIT(m)->cgroup_bondings,
-                             UNIT(m)->cgroup_attributes,
-+                            NULL,
-                             &pid)) < 0)
-                 goto fail;
-@@ -875,7 +876,8 @@ static void mount_enter_signal(Mount *m, MountState state, MountResult f) {
-                                 if ((r = set_put(pid_set, LONG_TO_PTR(m->control_pid))) < 0)
-                                         goto fail;
--                        if ((r = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, sig, true, pid_set)) < 0) {
-+                        r = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, sig, true, pid_set, NULL);
-+                        if (r < 0) {
-                                 if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
-                                         log_warning("Failed to kill control group: %s", strerror(-r));
-                         } else if (r > 0)
-@@ -1833,7 +1835,8 @@ static int mount_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
-                                 goto finish;
-                         }
--                if ((q = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, signo, false, pid_set)) < 0)
-+                q = cgroup_bonding_kill_list(UNIT(m)->cgroup_bondings, signo, false, pid_set, NULL);
-+                if (q < 0)
-                         if (q != -EAGAIN && q != -ESRCH && q != -ENOENT)
-                                 r = q;
-         }
-diff --git a/src/service.c b/src/service.c
-index 1c04ed3..59dd712 100644
---- a/src/service.c
-+++ b/src/service.c
-@@ -1686,6 +1686,7 @@ static int service_spawn(
-                 bool apply_chroot,
-                 bool apply_tty_stdin,
-                 bool set_notify_socket,
-+                bool is_control,
-                 pid_t *_pid) {
-         pid_t pid;
-@@ -1767,6 +1768,7 @@ static int service_spawn(
-                        UNIT(s)->manager->confirm_spawn,
-                        UNIT(s)->cgroup_bondings,
-                        UNIT(s)->cgroup_attributes,
-+                       is_control ? "control" : NULL,
-                        &pid);
-         if (r < 0)
-@@ -1886,15 +1888,17 @@ static void service_enter_stop_post(Service *s, ServiceResult f) {
-         if ((s->control_command = s->exec_command[SERVICE_EXEC_STOP_POST])) {
-                 s->control_command_id = SERVICE_EXEC_STOP_POST;
--                if ((r = service_spawn(s,
--                                       s->control_command,
--                                       true,
--                                       false,
--                                       !s->permissions_start_only,
--                                       !s->root_directory_start_only,
--                                       true,
--                                       false,
--                                       &s->control_pid)) < 0)
-+                r = service_spawn(s,
-+                                  s->control_command,
-+                                  true,
-+                                  false,
-+                                  !s->permissions_start_only,
-+                                  !s->root_directory_start_only,
-+                                  true,
-+                                  false,
-+                                  true,
-+                                  &s->control_pid);
-+                if (r < 0)
-                         goto fail;
-@@ -1952,7 +1956,8 @@ static void service_enter_signal(Service *s, ServiceState state, ServiceResult f
-                                 if ((r = set_put(pid_set, LONG_TO_PTR(s->control_pid))) < 0)
-                                         goto fail;
--                        if ((r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set)) < 0) {
-+                        r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set, NULL);
-+                        if (r < 0) {
-                                 if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
-                                         log_warning("Failed to kill control group: %s", strerror(-r));
-                         } else if (r > 0)
-@@ -2001,15 +2006,17 @@ static void service_enter_stop(Service *s, ServiceResult f) {
-         if ((s->control_command = s->exec_command[SERVICE_EXEC_STOP])) {
-                 s->control_command_id = SERVICE_EXEC_STOP;
--                if ((r = service_spawn(s,
--                                       s->control_command,
--                                       true,
--                                       false,
--                                       !s->permissions_start_only,
--                                       !s->root_directory_start_only,
--                                       false,
--                                       false,
--                                       &s->control_pid)) < 0)
-+                r = service_spawn(s,
-+                                  s->control_command,
-+                                  true,
-+                                  false,
-+                                  !s->permissions_start_only,
-+                                  !s->root_directory_start_only,
-+                                  false,
-+                                  false,
-+                                  true,
-+                                  &s->control_pid);
-+                if (r < 0)
-                         goto fail;
-                 service_set_state(s, SERVICE_STOP);
-@@ -2054,15 +2061,17 @@ static void service_enter_start_post(Service *s) {
-         if ((s->control_command = s->exec_command[SERVICE_EXEC_START_POST])) {
-                 s->control_command_id = SERVICE_EXEC_START_POST;
--                if ((r = service_spawn(s,
--                                       s->control_command,
--                                       true,
--                                       false,
--                                       !s->permissions_start_only,
--                                       !s->root_directory_start_only,
--                                       false,
--                                       false,
--                                       &s->control_pid)) < 0)
-+                r = service_spawn(s,
-+                                  s->control_command,
-+                                  true,
-+                                  false,
-+                                  !s->permissions_start_only,
-+                                  !s->root_directory_start_only,
-+                                  false,
-+                                  false,
-+                                  true,
-+                                  &s->control_pid);
-+                if (r < 0)
-                         goto fail;
-                 service_set_state(s, SERVICE_START_POST);
-@@ -2094,7 +2103,7 @@ static void service_enter_start(Service *s) {
-         /* We want to ensure that nobody leaks processes from
-          * START_PRE here, so let's go on a killing spree, People
-          * should not spawn long running processes from START_PRE. */
--        cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
-+        cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL, "control");
-         if (s->type == SERVICE_FORKING) {
-                 s->control_command_id = SERVICE_EXEC_START;
-@@ -2108,15 +2117,17 @@ static void service_enter_start(Service *s) {
-                 c = s->main_command = s->exec_command[SERVICE_EXEC_START];
-         }
--        if ((r = service_spawn(s,
--                               c,
--                               s->type == SERVICE_FORKING || s->type == SERVICE_DBUS || s->type == SERVICE_NOTIFY,
--                               true,
--                               true,
--                               true,
--                               true,
--                               s->notify_access != NOTIFY_NONE,
--                               &pid)) < 0)
-+        r = service_spawn(s,
-+                          c,
-+                          s->type == SERVICE_FORKING || s->type == SERVICE_DBUS || s->type == SERVICE_NOTIFY,
-+                          true,
-+                          true,
-+                          true,
-+                          true,
-+                          s->notify_access != NOTIFY_NONE,
-+                          false,
-+                          &pid);
-+        if (r < 0)
-                 goto fail;
-         if (s->type == SERVICE_SIMPLE) {
-@@ -2168,19 +2179,21 @@ static void service_enter_start_pre(Service *s) {
-                 /* Before we start anything, let's clear up what might
-                  * be left from previous runs. */
--                cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL);
-+                cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, SIGKILL, true, NULL, "control");
-                 s->control_command_id = SERVICE_EXEC_START_PRE;
--                if ((r = service_spawn(s,
--                                       s->control_command,
--                                       true,
--                                       false,
--                                       !s->permissions_start_only,
--                                       !s->root_directory_start_only,
--                                       true,
--                                       false,
--                                       &s->control_pid)) < 0)
-+                r = service_spawn(s,
-+                                  s->control_command,
-+                                  true,
-+                                  false,
-+                                  !s->permissions_start_only,
-+                                  !s->root_directory_start_only,
-+                                  true,
-+                                  false,
-+                                  true,
-+                                  &s->control_pid);
-+                if (r < 0)
-                         goto fail;
-                 service_set_state(s, SERVICE_START_PRE);
-@@ -2236,15 +2249,17 @@ static void service_enter_reload(Service *s) {
-         if ((s->control_command = s->exec_command[SERVICE_EXEC_RELOAD])) {
-                 s->control_command_id = SERVICE_EXEC_RELOAD;
--                if ((r = service_spawn(s,
--                                       s->control_command,
--                                       true,
--                                       false,
--                                       !s->permissions_start_only,
--                                       !s->root_directory_start_only,
--                                       false,
--                                       false,
--                                       &s->control_pid)) < 0)
-+                r = service_spawn(s,
-+                                  s->control_command,
-+                                  true,
-+                                  false,
-+                                  !s->permissions_start_only,
-+                                  !s->root_directory_start_only,
-+                                  false,
-+                                  false,
-+                                  true,
-+                                  &s->control_pid);
-+                if (r < 0)
-                         goto fail;
-                 service_set_state(s, SERVICE_RELOAD);
-@@ -2271,16 +2286,18 @@ static void service_run_next_control(Service *s) {
-         s->control_command = s->control_command->command_next;
-         service_unwatch_control_pid(s);
--        if ((r = service_spawn(s,
--                               s->control_command,
--                               true,
--                               false,
--                               !s->permissions_start_only,
--                               !s->root_directory_start_only,
--                               s->control_command_id == SERVICE_EXEC_START_PRE ||
--                               s->control_command_id == SERVICE_EXEC_STOP_POST,
--                               false,
--                               &s->control_pid)) < 0)
-+        r = service_spawn(s,
-+                          s->control_command,
-+                          true,
-+                          false,
-+                          !s->permissions_start_only,
-+                          !s->root_directory_start_only,
-+                          s->control_command_id == SERVICE_EXEC_START_PRE ||
-+                          s->control_command_id == SERVICE_EXEC_STOP_POST,
-+                          false,
-+                          true,
-+                          &s->control_pid);
-+        if (r < 0)
-                 goto fail;
-         return;
-@@ -2313,15 +2330,17 @@ static void service_run_next_main(Service *s) {
-         s->main_command = s->main_command->command_next;
-         service_unwatch_main_pid(s);
--        if ((r = service_spawn(s,
--                               s->main_command,
--                               false,
--                               true,
--                               true,
--                               true,
--                               true,
--                               s->notify_access != NOTIFY_NONE,
--                               &pid)) < 0)
-+        r = service_spawn(s,
-+                          s->main_command,
-+                          false,
-+                          true,
-+                          true,
-+                          true,
-+                          true,
-+                          s->notify_access != NOTIFY_NONE,
-+                          false,
-+                          &pid);
-+        if (r < 0)
-                 goto fail;
-         service_set_main_pid(s, pid);
-@@ -3647,8 +3666,8 @@ static int service_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusErro
-                                 r = q;
-                                 goto finish;
-                         }
--
--                if ((q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set)) < 0)
-+                q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set, NULL);
-+                if (q < 0)
-                         if (q != -EAGAIN && q != -ESRCH && q != -ENOENT)
-                                 r = q;
-         }
-diff --git a/src/socket.c b/src/socket.c
-index 37a0236..a439717 100644
---- a/src/socket.c
-+++ b/src/socket.c
-@@ -1150,6 +1150,7 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
-                        UNIT(s)->manager->confirm_spawn,
-                        UNIT(s)->cgroup_bondings,
-                        UNIT(s)->cgroup_attributes,
-+                       NULL,
-                        &pid);
-         strv_free(argv);
-@@ -1240,7 +1241,8 @@ static void socket_enter_signal(Socket *s, SocketState state, SocketResult f) {
-                                 if ((r = set_put(pid_set, LONG_TO_PTR(s->control_pid))) < 0)
-                                         goto fail;
--                        if ((r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set)) < 0) {
-+                        r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set, NULL);
-+                        if (r < 0) {
-                                 if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
-                                         log_warning("Failed to kill control group: %s", strerror(-r));
-                         } else if (r > 0)
-@@ -2127,7 +2129,8 @@ static int socket_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError
-                                 goto finish;
-                         }
--                if ((q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set)) < 0)
-+                q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set, NULL);
-+                if (q < 0)
-                         if (q != -EAGAIN && q != -ESRCH && q != -ENOENT)
-                                 r = q;
-         }
-diff --git a/src/swap.c b/src/swap.c
-index 6331864..363852d 100644
---- a/src/swap.c
-+++ b/src/swap.c
-@@ -621,6 +621,7 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) {
-                             UNIT(s)->manager->confirm_spawn,
-                             UNIT(s)->cgroup_bondings,
-                             UNIT(s)->cgroup_attributes,
-+                            NULL,
-                             &pid)) < 0)
-                 goto fail;
-@@ -690,7 +691,8 @@ static void swap_enter_signal(Swap *s, SwapState state, SwapResult f) {
-                                 if ((r = set_put(pid_set, LONG_TO_PTR(s->control_pid))) < 0)
-                                         goto fail;
--                        if ((r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set)) < 0) {
-+                        r = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, sig, true, pid_set, NULL);
-+                        if (r < 0) {
-                                 if (r != -EAGAIN && r != -ESRCH && r != -ENOENT)
-                                         log_warning("Failed to kill control group: %s", strerror(-r));
-                         } else if (r > 0)
-@@ -1321,7 +1323,8 @@ static int swap_kill(Unit *u, KillWho who, KillMode mode, int signo, DBusError *
-                                 goto finish;
-                         }
--                if ((q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set)) < 0)
-+                q = cgroup_bonding_kill_list(UNIT(s)->cgroup_bondings, signo, false, pid_set, NULL);
-+                if (q < 0)
-                         if (q != -EAGAIN && q != -ESRCH && q != -ENOENT)
-                                 r = q;
-         }
---
-cgit v0.9.0.2-2-gbebe
This page took 0.074404 seconds and 4 git commands to generate.