Expand description
Safe wrappers around functions found in libc “unistd.h” header
Structs§
- Options for access()
- Group identifier
- Representation of a Group, based on
libc::group - Process identifier
- Real, effective and saved group IDs.
- Real, effective and saved user IDs.
- User identifier
- Representation of a User, based on
libc::passwd
Enums§
- Represents the successful result of calling
fork - Variable names for
pathconf - Variable names for
sysconf - Flags for
unlinkatfunction.
Constants§
- Constant for UID = 0
Functions§
- Change the current working directory of the calling process (see chdir(2)).
- Change the ownership of the file at
pathto be owned by the specifiedowner(user) andgroup(see chown(2)). - Change a process’s root directory
- Close a raw file descriptor
- Daemonize this process by detaching from the controlling terminal (see daemon(3)).
- Create a copy of the specified file descriptor (see dup(2)).
- Create a copy of the specified file descriptor using the specified fd (see dup(2)).
- Create a new copy of the specified file descriptor using the specified fd and flags (see
dup(2)). - Checks the file named by
pathfor accessibility according to the flags given bymodeusing effective UID, effective GID and supplementary group lists. - Replace the current process image with a new one (see exec(3)).
- Replace the current process image with a new one (see execve(2)).
- Execute program relative to a directory file descriptor (see execveat(2)).
- Replace the current process image with a new one and replicate shell
PATHsearching behavior (see exec(3)). - Replace the current process image with a new one and replicate shell
PATHsearching behavior (seeexecvpe(3)). - Checks the file named by
pathfor accessibility according to the flags given bymode - Change the current working directory of the process to the one given as an open file descriptor (see fchdir(2)).
- Change the ownership of the file referred to by the open file descriptor
fdto be owned by the specifiedowner(user) andgroup(see fchown(2)). - Change the ownership of the file at
pathto be owned by the specifiedowner(user) andgroup. - Synchronize the data of a file
- Replace the current process image with a new one (see fexecve(2)).
- fork⚠Create a new child process duplicating the parent process (see fork(2)).
- Like
pathconf, but works with file descriptors instead of paths (see fpathconf(2)) - Synchronize changes to a file
- Truncate a file to a specified length
- Returns the current directory as a
PathBuf - Get the effective group ID
- Get the effective user ID
- Get the real group ID
- Calculate the supplementary group access list.
- Get the list of supplementary group IDs of the calling process.
- Get process group
- Get the group id of the calling process (see getpgrp(3)).
- Get the pid of this process (see getpid(2)).
- Get the pid of this processes’ parent (see getpid(2)).
- Gets the real, effective, and saved group IDs.
- Gets the real, effective, and saved user IDs.
- Get the process group ID of a session leader getsid(2).
- Get the caller’s thread ID (see gettid(2).
- Get a real user ID
- Initialize the supplementary group access list.
- Determines if the file descriptor refers to a valid terminal type device.
- Link one file to another file
- Move the read/write file offset.
- Move the read/write file offset.
- Creates a directory which persists even after process termination
- Creates new fifo special file (named pipe) with path
pathand access rightsmode. - Creates new fifo special file (named pipe) with path
pathand access rightsmode. - Creates a regular file which persists even after process termination
- Get path-dependent configurable system variables (see pathconf(2))
- Create an interprocess channel.
- Like
pipe, but allows setting certain file descriptor flags. - Change the root file system.
- Read from a raw file descriptor.
- Set the effective group ID
- Set the effective user ID
- Set the group identity used for filesystem checks per-thread. On both success and failure, this call returns the previous filesystem group ID of the caller.
- Set the user identity used for filesystem checks per-thread. On both success and failure, this call returns the previous filesystem user ID of the caller.
- Set the group ID
- Set the list of supplementary group IDs for the calling process.
- Set a process group ID (see setpgid(2)).
- Sets the real, effective, and saved gid. (see setresuid(2))
- Sets the real, effective, and saved uid. (see setresuid(2))
- Create new session and set process group id (see setsid(2)).
- Set the user ID
- Suspend execution for an interval of time
- Creates a symbolic link at
path2which points topath1. - Commit filesystem caches to disk
- Commit filesystem caches containing file referred to by the open file descriptor
fdto disk - Get configurable system variables (see sysconf(3))
- Truncate a file to a specified length
- Remove a directory entry
- Remove a directory entry
- Write to a raw file descriptor.