X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fsystemctl.c;h=2e7a6a8c5c023376d20bc9d4dd9f0941fcbead03;hp=6d17649a7f976e3eb91a958b112ffd221335b81b;hb=fbc43921be7ed06112897d55e4d0b7ab986edc07;hpb=0278dfeb30a1d1022501f5671c548283d7ee9387 diff --git a/src/systemctl.c b/src/systemctl.c index 6d17649a7..2e7a6a8c5 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1171,7 +1171,10 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) { } if (!arg_no_block) - r = wait_for_jobs(bus, s); + if ((r = wait_for_jobs(bus, s)) < 0) + goto finish; + + r = 1; finish: if (s) @@ -4599,7 +4602,7 @@ static int start_with_fallback(DBusConnection *bus) { /* Nothing else worked, so let's try * /dev/initctl */ - if (talk_initctl() != 0) + if (talk_initctl() > 0) goto done; log_error("Failed to talk to init daemon.");