Expand description
Safe wrappers around functions found in libc “unistd.h” header
Modules§
- alarm
signal
- Alarm signal scheduling.
Structs§
- Access
Flags fs
- Options for access()
- Pid
process
- Process identifier
Enums§
- Fork
Result process
- Represents the successful result of calling
fork
- Unlinkat
Flags fs
- Flags for
unlinkat
function. - Whence
fs
- Directive that tells
lseek
andlseek64
what the offset is relative to.
Functions§
- access
fs
- Checks the file named by
path
for accessibility according to the flags given byamode
See access(2) - chdir
fs
- Change the current working directory of the calling process (see chdir(2)).
- chroot
fs
- Change a process’s root directory
- close
- Close a raw file descriptor
- daemon
process
- Daemonize this process by detaching from the controlling terminal (see daemon(3)).
- 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)).
- dup3
fs
- Create a new copy of the specified file descriptor using the specified fd
and flags (see
dup(2)
). - eaccess
fs
- Checks the file named by
path
for accessibility according to the flags given bymode
using effective UID, effective GID and supplementary group lists. - 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)).
- execveat
process
- Execute program relative to a directory file descriptor (see execveat(2)).
- execvp
process
- Replace the current process image with a new one and replicate shell
PATH
searching behavior (see exec(3)). - execvpe
process
- Replace the current process image with a new one and replicate shell
PATH
searching behavior (seeexecvpe(3)
). - faccessat
fs
- 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)).
- fdatasync
fs
- Synchronize the data of a file
- fexecve
process
- Replace the current process image with a new one (see fexecve(2)).
- fork⚠
process
- Create a new child process duplicating the parent process (see fork(2)).
- fsync
fs
- Synchronize changes to a file
- ftruncate
fs
- Truncate a file to a specified length
- getcwd
fs
- Returns the current directory as a
PathBuf
- 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).
- gettid
process
- Get the caller’s thread ID (see gettid(2).
- 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.
- lseek64
fs
- Move the read/write file offset.
- mkdir
fs
- Creates new directory
path
with access rightsmode
. (see mkdir(2)) - mkfifo
fs
- Creates new fifo special file (named pipe) with path
path
and access rightsmode
. - mkfifoat
fs
- Creates new fifo special file (named pipe) with path
path
and access rightsmode
. - mkstemp
fs
- Creates a regular file which persists even after process termination
- pause
signal
- Suspend the thread until a signal is received.
- pipe
- Create an interprocess channel.
- pipe2
fs
- Like
pipe
, but allows setting certain file descriptor flags. - pivot_
root fs
- Change the root file system.
- read
- Read from a raw file descriptor.
- setpgid
process
- Set a process group ID (see setpgid(2)).
- setsid
process
- Create new session and set process group id (see setsid(2)).
- sleep
- Suspend execution for an interval of time
- symlinkat
fs
- Creates a symbolic link at
path2
which points topath1
. - sync
fs
- Commit filesystem caches to disk
- syncfs
fs
- Commit filesystem caches containing file referred to by the open file
descriptor
fd
to disk - truncate
fs
- Truncate a file to a specified length
- unlink
fs
- Remove a directory entry
- unlinkat
fs
- Remove a directory entry
- write
- Write to a raw file descriptor.