[systemd-devel] [PATCH] service: Allow mainpid to restart in other than SERVICE_EXEC_START.

Mirco Tischler mt-ml at gmx.de
Mon Jan 10 05:57:41 PST 2011


This patch should fix it. Can you test it? The problem was that after a
the mainpid exits,
and because there are commands left to execute systemd assumes it
executes an ExecStart
line from a type=oneshot service file. But in this case it executes an
ExecReload line.
This patch simply removes the assumptions. AFAICT this should work.

Mirco
---
 src/service.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/service.c b/src/service.c
index a28eb8a..4ff9f5d 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2181,9 +2181,6 @@ static void service_run_next_main(Service *s, bool
success) {
         if (!success)
                 s->failure = true;
 
-        assert(s->control_command_id == SERVICE_EXEC_START);
-        assert(s->type == SERVICE_ONESHOT);
-
         s->control_command = s->control_command->command_next;
         service_unwatch_main_pid(s);
 


More information about the systemd-devel mailing list