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

Alexander E. Patrakov patrakov at gmail.com
Mon Jan 10 06:34:14 PST 2011


10.01.2011 18:57, Mirco Tischler wrote:
> 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.

This doesn't crash, but doesn't solve the "/bin/kill from ExecStop 
sometimes fails" problem.

> 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