X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-service.c;h=696c4462fe257010dcd394afd4bea39e7060bdb6;hb=da7e457c5b9339721454ae8401a03ffdd781e6a9;hp=1a44e1fd1b4057876760b64de3f0efce832712d8;hpb=6577c7cea72f19185ad999c223bcf663c010dc6f;p=elogind.git diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index 1a44e1fd1..696c4462f 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -273,21 +273,16 @@ static int bus_service_set_transient_property( fputs("ExecStart=\n", f); LIST_FOREACH(command, c, s->exec_command[SERVICE_EXEC_START]) { - char **a; - fputs("ExecStart=", f); + _cleanup_free_ char *a; - if (c->ignore) - fputc('-', f); - - fputc('@', f); - fputs(c->path, f); - - STRV_FOREACH(a, c->argv) { - fputc(' ', f); - fputs(*a, f); - } + a = strv_join_quoted(c->argv); + if (!a) + return -ENOMEM; - fputc('\n', f); + fprintf(f, "ExecStart=%s@%s %s\n", + c->ignore ? "-" : "", + c->path, + a); } fflush(f); @@ -324,6 +319,10 @@ int bus_service_set_property( r = bus_service_set_transient_property(s, name, i, mode, error); if (r != 0) return r; + + r = bus_kill_context_set_transient_property(u, &s->kill_context, name, i, mode, error); + if (r != 0) + return r; } return 0;