Skip to content
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

hostnamed: exit-on-idle tweaks #32720

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

poettering
Copy link
Member

@poettering poettering commented May 8, 2024

No description provided.

…ns are still ongoing

And while we are at it, ongoing PK authorizations are also a reason to
block exit on idle.
Copy link

github-actions bot commented May 8, 2024

Important

An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released.

_public_ int sd_bus_pending_method_calls(sd_bus *bus) {

/* Returns the number of currently pending asynchronous method calls. This is graceful, i.e. an
* unallocate (i.e. NULL) bus connection has no method calls pending. */
Copy link
Member

Choose a reason for hiding this comment

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

"unallocated"

if (!bus)
return 0;

assert_return(bus, -EINVAL);
Copy link
Member

Choose a reason for hiding this comment

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

this is redundant with the check above

@bluca bluca added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels May 8, 2024
Copy link
Member

@YHNdnzj YHNdnzj left a comment

Choose a reason for hiding this comment

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

Please mention the new API in NEWS.

<refnamediv>
<refname>sd_bus_pending_method_calls</refname>

<refpurpose>Return number of currently pending, outgoing method calls</refpurpose>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<refpurpose>Return number of currently pending, outgoing method calls</refpurpose>
<refpurpose>Return the number of currently pending, outgoing method calls</refpurpose>

@poettering
Copy link
Member Author

i guess we should do this for v257. While the current behaviour of exiting on idle even if polkit authentication is still pending is mildly buggy it also doesn't really matter, the time window should be too small.

Moreover this probably needs fixing in more than just hostnamed, hence this is kinda incomplete.

@poettering poettering added this to the v257 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants