mirror of
https://github.com/systemd/systemd.git
synced 2024-12-03 15:23:36 +08:00
busctl: send READY=1 when we become a monitor
This is pretty much the same stuff as `resolvectl monitor` does, and allows us to run `busctl monitor` in a Type=notify unit which ensures that `busctl` is really listening for messages once the unit is marked as started.
This commit is contained in:
parent
9a42457bae
commit
c39a6ab789
@ -1311,6 +1311,8 @@ static int monitor(int argc, char **argv, int (*dump)(sd_bus_message *m, FILE *f
|
||||
if (!arg_quiet && arg_json_format_flags == JSON_FORMAT_OFF)
|
||||
log_info("Monitoring bus message stream.");
|
||||
|
||||
(void) sd_notify(/* unset_environment=false */ false, "READY=1");
|
||||
|
||||
for (;;) {
|
||||
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user