-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deb: Stop using --wait
option of systemctl
#526
deb: Stop using --wait
option of systemctl
#526
Conversation
Note:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I couldn't understand the document what --wait
does, so I read the source code:
aho@Ryzen:~/src/systemd-249.11/src/systemctl$ grep -rn arg_wait
systemctl.c:70:bool arg_wait = false;
systemctl.c:634: arg_wait = true;
systemctl.c:937: if (arg_wait && arg_no_block)
systemctl.c:949: if (arg_wait)
systemctl-start-unit.c:274: if (arg_wait && !STR_IN_SET(argv[0], "start", "restart"))
systemctl-start-unit.c:280: r = acquire_bus(arg_wait ? BUS_FULL : BUS_MANAGER, &bus);
systemctl-start-unit.c:354: if (arg_wait) {
systemctl-start-unit.c:396: if (arg_wait) {
systemctl.h:54:extern bool arg_wait;
systemctl-is-system-running.c:44: if (arg_wait) {
systemctl-is-system-running.c:57: arg_wait = false;
systemctl-is-system-running.c:70: if (arg_wait && STR_IN_SET(state, "initializing", "starting")) {
It's only affected on systemctl start
or systemctl is-system-running
, not affected to status
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've noticed the inappropriate comment in your commit message:
By default, systemctl status waits until the unit's start-up is completed (without --no-block option).
--wait is an option about terminating, and has nothing to do with the start-up.
Could you revise this comment?
The option --wait
is for blocking systemctl start foobar
until the service foobar
is stopped.
We misunderstood the use of this option. By default, `systemctl status` waits until the unit's start-up is completed (without `--no-block` option). The option `--wait` is for blocking `systemctl start foobar` until the service `foobar` is stopped. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
8279389
to
e8cadd9
Compare
Thanks for your review! I see! The commit message and the issue comment is updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
We misunderstood the use of this option.
By default,
systemctl status
waits until the unit's start-up is completed (without--no-block
option).The option
--wait
is for blockingsystemctl start foobar
until the servicefoobar
is stopped.