mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 18:55:40 +03:00
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.
This commit is contained in:
parent
bc21034688
commit
46f2579c2a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user