[systemd-commits] 2 commits - TODO src/core

Lennart Poettering lennart at kemper.freedesktop.org
Thu Feb 13 02:13:56 CET 2014


 TODO            |    4 ----
 src/core/unit.c |    9 +++++----
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 513a78c1aac9fe2de939bed4afb03589216f5471
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 13 02:13:50 2014 +0100

    update TODO

diff --git a/TODO b/TODO
index d1681f4..aa8aca1 100644
--- a/TODO
+++ b/TODO
@@ -35,10 +35,6 @@ Preparation for 209:
 
 * Merge Distribute= patches for .socket units
 
-* When a Type=forking service fails and needed another service, that
-  service is not cleaned up again when it has StopWhenUnneeded=yes
-  http://lists.freedesktop.org/archives/systemd-devel/2013-July/012141.html
-
 Features:
 
 * maybe: hookup nspawn and PrivateNetwork=yes with "ip netns"

commit b33918c210a9b7a651e4e91cf7429967f1df6c25
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 13 02:12:27 2014 +0100

    core: make StopWhenUnneeded work in conjunction with units that fail
    during their start job
    
    https://bugzilla.redhat.com/show_bug.cgi?id=997031

diff --git a/src/core/unit.c b/src/core/unit.c
index 1a8fdcb..0277675 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1534,7 +1534,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
          * sucessfully, since there's no change of state in that case. Which is
          * why it is handled in service_set_state() */
         if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) {
-                ExecContext *ec = unit_get_exec_context(u);
+                ExecContext *ec;
+
+                ec = unit_get_exec_context(u);
                 if (ec && exec_context_may_touch_console(ec)) {
                         if (UNIT_IS_INACTIVE_OR_FAILED(ns)) {
                                 m->n_on_console --;
@@ -1630,12 +1632,11 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
                 }
 
                 /* stop unneeded units regardless if going down was expected or not */
-                if (UNIT_IS_ACTIVE_OR_ACTIVATING(os) && UNIT_IS_INACTIVE_OR_DEACTIVATING(ns))
+                if (UNIT_IS_INACTIVE_OR_DEACTIVATING(ns))
                         check_unneeded_dependencies(u);
 
                 if (ns != os && ns == UNIT_FAILED) {
-                        log_notice_unit(u->id,
-                                        "Unit %s entered failed state.", u->id);
+                        log_notice_unit(u->id, "Unit %s entered failed state.", u->id);
                         unit_start_on_failure(u);
                 }
         }



More information about the systemd-commits mailing list