You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlinked files (such as those created by O_TMPFILE) can be linked back to the filesystem via /proc/self/fd/$n (or linkat(AT_EMPTY_PATH) but this requires privileges and is thus less preferable). There is also a planned extension to renameat2(2) to allow you to also clobber the target file in the same atomic operation.
This is a very useful operation, especially if you use O_TMPFILE to create and populate a temporary file before making it visible to other programs through the filesystem, but is currently not provided by libpathrs.
This is also something that libpathrs really should provide helpers for, because it requires non-trivial usage of /proc/self/fd/$n that cannot be accomplished purely through our APIs (namely the linkat(2) operation needs to do a same-mount-id check for the fd magiclink).
Activity
linkat(2)#354[-]feature: support linking fds into `Root`s[/-][+]feature: support hardlinking fds into `Root`s[/+]