Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ mounts.
around only a file descriptor without having to keep the path around
to be able to unlink the file/directory.

### Unlinking via two file descriptors

`unlinkat2(dir_fd, name, inode_fd)`: taking one file descriptor
for the directory to remove a file in, and another one referring
to the inode of the filename to remove. This call should only
succeed if the specified filename still refers to the specified
inode.

**Use-Case:** code that operates on a well-know path that might be
shared by multiple programs that jointly manage it might want to
safely remove a filename under the guarantee it still refers to
the expected inode. As a specific example, consider lock files,
that should be cleaned up only if they still refer to the assumed
owner's instance, but leave the file in place if another process
already took over the filename.

### `AT_EMPTY_PATH` support for `openat()` and `openat2()`

To get an operable version of an `O_PATH` file descriptors, it is
Expand Down Expand Up @@ -323,22 +339,6 @@ disk I/O. Consider implementation of a naive web browser which is
pointed to `file://dev/zero`, not expecting an endless amount of
data to read.

### Unlinking via two file descriptors

`unlinkat3(dir_fd, name, inode_fd)`: taking one file descriptor
for the directory to remove a file in, and another one referring
to the inode of the filename to remove. This call should only
succeed if the specified filename still refers to the specified
inode.

**Use-Case:** code that operates on a well-know path that might be
shared by multiple programs that jointly manage it might want to
safely remove a filename under the guarantee it still refers to
the expected inode. As a specific example, consider lock files,
that should be cleaned up only if they still refer to the assumed
owner's instance, but leave the file in place if another process
already took over the filename.

### Determining if a mount point belongs to the current user

Ability to determine if a mount point belongs to the current user
Expand Down
Loading