Skip to content

Add notify-reload support to dbus-broker #386

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slee649
Copy link

@slee649 slee649 commented Feb 26, 2025

dbus-broker supports reload but the service type is notify. This PR updates the service type to notify-reload.

@slee649 slee649 force-pushed the user/seaeunlee/notify-reload-support branch 3 times, most recently from 2d1814f to cabe8fa Compare February 26, 2025 18:32
@slee649 slee649 force-pushed the user/seaeunlee/notify-reload-support branch from cabe8fa to ba5c384 Compare March 13, 2025 18:08
Copy link
Member

@dvdhrm dvdhrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the PR! Some minor comments inline.

I will try to push out a time utility, so we can rebase this PR and use it. But please bear with me until next Monday!

@slee649 slee649 force-pushed the user/seaeunlee/notify-reload-support branch from ba5c384 to f54c335 Compare April 29, 2025 14:58
@slee649
Copy link
Author

slee649 commented Apr 29, 2025

Hey @dvdhrm , thanks for the review!
I removed the time util I wrote and modified to use yours. Please let me know if I'm missing anything.

@slee649 slee649 force-pushed the user/seaeunlee/notify-reload-support branch from f54c335 to 1e75da9 Compare April 29, 2025 15:00
r = sd_notify(false, "RELOADING=1");
r = sd_notifyf(/* unset_environment = */ false,
"RELOADING=1\n"
"MONOTONIC_USEC=" USEC_FMT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

../src/launch/launcher.c:1173:41: error: expected ‘)’ before ‘USEC_FMT’
 1173 |                        "MONOTONIC_USEC=" USEC_FMT,

Use "MONOTONIC_USEC=%" NSEC_PRI, instead and it should work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you need to pass it through nsec_to_usec() given the helper returns nanoseconds and the API takes microseconds

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, careless mistake

@slee649 slee649 force-pushed the user/seaeunlee/notify-reload-support branch from 1e75da9 to 2d138f5 Compare April 29, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants