Expand description
Safe wrappers around functions found in libc “unistd.h” header
Modules§
Structs§
- Options for access()
- Gid
user
Group identifier - Group
user
Representation of a Group, based onlibc::group
- Pid
process
Process identifier - Uid
user
User identifier - User
user
Representation of a User, based onlibc::passwd
Enums§
- ForkResult
process
Represents the successful result of callingfork
- PathconfVar
fs
andfeature
Variable names forpathconf
- SysconfVar
feature
Variable names forsysconf
- Flags for
unlinkat
function. - Whence
fs
Constants§
- ROOT
user
Constant for UID = 0
Functions§
- access
fs
- chdir
fs
Change the current working directory of the calling process (see chdir(2)). - chflags
fs
Set the file flags. - chown
user
andfs
Change the ownership of the file atpath
to be owned by the specifiedowner
(user) andgroup
(see chown(2)). - chroot
fs
Change a process’s root directory - Close a raw file descriptor
- dup
fs
Create a copy of the specified file descriptor (see dup(2)). - dup2
fs
Create a copy of the specified file descriptor using the specified fd (see dup(2)). - execv
process
Replace the current process image with a new one (see exec(3)). - execve
process
Replace the current process image with a new one (see execve(2)). - execvp
process
Replace the current process image with a new one and replicate shellPATH
searching behavior (see exec(3)). - Checks the file named by
path
for accessibility according to the flags given bymode
- fchdir
fs
Change the current working directory of the process to the one given as an open file descriptor (see fchdir(2)). - fchown
user
andfs
Change the ownership of the file referred to by the open file descriptorfd
to be owned by the specifiedowner
(user) andgroup
(see fchown(2)). - fchownat
user
andfs
Change the ownership of the file atpath
to be owned by the specifiedowner
(user) andgroup
. - fork⚠
process
Create a new child process duplicating the parent process (see fork(2)). - fpathconf
fs
andfeature
Likepathconf
, but works with file descriptors instead of paths (see fpathconf(2)) - fsync
fs
Synchronize changes to a file - Truncate a file to a specified length
- getcwd
fs
Returns the current directory as aPathBuf
- getegid
user
Get the effective group ID - geteuid
user
Get the effective user ID - getgid
user
Get the real group ID - gethostname
hostname
Get the host name and store it in an internally allocated buffer, returning anOsString
on success (see gethostname(2)). - getpeereid
socket
anduser
Get the effective user ID and group ID associated with a Unix domain socket. - getpgid
process
Get process group - getpgrp
process
Get the group id of the calling process (see getpgrp(3)). - getpid
process
Get the pid of this process (see getpid(2)). - getppid
process
Get the pid of this processes’ parent (see getpid(2)). - getsid
process
Get the process group ID of a session leader getsid(2). - getuid
user
Get a real user ID - isatty
fs
Determines if the file descriptor refers to a valid terminal type device. - linkat
fs
Link one file to another file - lseek
fs
Move the read/write file offset. - mkdir
fs
- mkdtemp
fs
andfeature
Creates a directory which persists even after process termination - mkfifo
fs
Creates new fifo special file (named pipe) with pathpath
and access rightsmode
. - mkstemp
fs
Creates a regular file which persists even after process termination - pathconf
fs
andfeature
Get path-dependent configurable system variables (see pathconf(2)) - pause
signal
Suspend the thread until a signal is received. - Create an interprocess channel.
- Read from a raw file descriptor.
- setegid
user
Set the effective group ID - seteuid
user
Set the effective user ID - setgid
user
Set the group ID - sethostname
hostname
Set the system host name (see sethostname(2)). - setpgid
process
Set a process group ID (see setpgid(2)). - setsid
process
Create new session and set process group id (see setsid(2)). - setuid
user
Set the user ID - Suspend execution for an interval of time
- Creates a symbolic link at
path2
which points topath1
. - sysconf
feature
Get configurable system variables (see sysconf(3)) - tcgetpgrp
process
andterm
Get the terminal foreground process group (see tcgetpgrp(3)). - tcsetpgrp
process
andterm
Set the terminal foreground process group (see tcgetpgrp(3)). - truncate
fs
Truncate a file to a specified length - ttyname
term
Get the name of the terminal device that is open on file descriptor fd (seettyname(3)
). - unlink
fs
Remove a directory entry - unlinkat
fs
Remove a directory entry - Write to a raw file descriptor.
Type Aliases§
- FchownatFlags
user
andfs