Skip to content

[pull] master from OpenRC:master#66

Merged
pull[bot] merged 1 commit intoStars1233:masterfrom
OpenRC:master
Jun 29, 2025
Merged

[pull] master from OpenRC:master#66
pull[bot] merged 1 commit intoStars1233:masterfrom
OpenRC:master

Conversation

@pull
Copy link

@pull pull bot commented Jun 29, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.2)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Introduce a centralized function to close and reset cached directory file descriptors and replace manual cleanup in key code paths with calls to it.

Enhancements:

  • Add clear_dirfds() to close and invalidate all cached directory file descriptors.
  • Replace manual dirfd cleanup in rc_set_user() with a call to clear_dirfds().
  • Invoke clear_dirfds() after creating the service directory in rc_deptree_update_needed() to clear stale dirfds.
  • Declare clear_dirfds() in the public librc.h header.

if for whatever reason, /run/openrc exists in the rootfs before first
boot, we'd still end up with an invalid fd. while users are not really
supposed to have anything in /run (under the tmpfs mount), should they
do, it's better to not fail

clearing the dirfds as we create svcdir also means we don't need a new
librc api function to clear it, for now at least.
@pull pull bot locked and limited conversation to collaborators Jun 29, 2025
@pull pull bot added the ⤵️ pull label Jun 29, 2025
@pull pull bot merged commit 22bfd3a into Stars1233:master Jun 29, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant