From: Filipe Brandenburger Date: Fri, 20 Jul 2018 18:32:55 +0000 (-0700) Subject: systemctl: Only wait when there's something to wait for. X-Git-Tag: v240~930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46f2579c2ac9f6780d5afec1000764defc6b581e;p=platform%2Fupstream%2Fsystemd.git systemctl: Only wait when there's something to wait for. Tested: - `systemctl --wait start i-do-not-exist.service` does not wait. - `systemctl --wait start i-do-not-exist.service valid-unit.service` does. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 6f8934e..d9bef99 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3149,7 +3149,7 @@ static int start_unit(int argc, char *argv[], void *userdata) { (void) check_triggering_units(bus, *name); } - if (r >= 0 && arg_wait) { + if (r >= 0 && arg_wait && !set_isempty(wait_context.unit_paths)) { int q; q = sd_event_loop(wait_context.event); if (q < 0)