[go: up one dir, main page]

Module unistd

Source
Expand description

Safe wrappers around functions found in libc “unistd.h” header

Modules§

acctacct
Process accounting
alarmsignal
Alarm signal scheduling.

Structs§

AccessFlagsfs
Options for access()
Giduser
Group identifier
Groupuser
Representation of a Group, based on libc::group
Pidprocess
Process identifier
ResGiduser
Real, effective and saved group IDs.
ResUiduser
Real, effective and saved user IDs.
Uiduser
User identifier
Useruser
Representation of a User, based on libc::passwd

Enums§

ForkResultprocess
Represents the successful result of calling fork
PathconfVarfs and feature
Variable names for pathconf
SysconfVarfeature
Variable names for sysconf
UnlinkatFlagsfs
Flags for unlinkat function.
Whencefs
Directive that tells lseek and lseek64 what the offset is relative to.

Constants§

ROOTuser
Constant for UID = 0

Functions§

accessfs
Checks the file named by path for accessibility according to the flags given by amode See access(2)
chdirfs
Change the current working directory of the calling process (see chdir(2)).
chownuser and fs
Change the ownership of the file at path to be owned by the specified owner (user) and group (see chown(2)).
chrootfs
Change a process’s root directory
close
Close a file descriptor.
daemonprocess
Daemonize this process by detaching from the controlling terminal (see daemon(3)).
dupfs
Create a copy of the specified file descriptor.
dup2fs
Create a copy of oldfd using newfd.
dup3fs
Create a new copy of the specified file descriptor using the specified fd and flags.
dup2_rawfs
Create a copy of oldfd with any fd value you want.
dup2_stderrfs
Duplicate fd with Stderr, i.e., Stderr redirection.
dup2_stdinfs
Duplicate fd with Stdin, i.e., Stdin redirection.
dup2_stdoutfs
Duplicate fd with Stdout, i.e., Stdout redirection.
dup3_rawfs
Create a new copy of the specified file descriptor using the specified fd and flags.
eaccessfs
Checks the file named by path for accessibility according to the flags given by mode using effective UID, effective GID and supplementary group lists.
execvprocess
Replace the current process image with a new one (see exec(3)).
execveprocess
Replace the current process image with a new one (see execve(2)).
execveatprocess
Execute program relative to a directory file descriptor (see execveat(2)).
execvpprocess
Replace the current process image with a new one and replicate shell PATH searching behavior (see exec(3)).
execvpeprocess
Replace the current process image with a new one and replicate shell PATH searching behavior (see execvpe(3)).
faccessatfs
Checks the file named by dirfd and path for accessibility according to the flags given by mode
fchdirfs
Change the current working directory of the process to the one given as an open file descriptor (see fchdir(2)).
fchownuser and fs
Change the ownership of the file referred to by the open file descriptor fd to be owned by the specified owner (user) and group.
fchownatuser and fs
Change the ownership of the file at path to be owned by the specified owner (user) and group.
fdatasyncfs
Synchronize the data of a file
fexecveprocess
Replace the current process image with a new one (see fexecve(2)).
forkprocess
Create a new child process duplicating the parent process (see fork(2)).
fpathconffs and feature
Like pathconf, but works with file descriptors instead of paths (see fpathconf(2))
fsyncfs
Synchronize changes to a file
ftruncatefs
Truncate a file to a specified length
getcwdfs
Returns the current directory as a PathBuf
getegiduser
Get the effective group ID
geteuiduser
Get the effective user ID
getgiduser
Get the real group ID
getgrouplistuser
Calculate the supplementary group access list.
getgroupsuser
Get the list of supplementary group IDs of the calling process.
gethostnamehostname
Get the host name and store it in an internally allocated buffer, returning an OsString on success.
getpgidprocess
Get process group
getpgrpprocess
Get the group id of the calling process (see getpgrp(3)).
getpidprocess
Get the pid of this process (see getpid(2)).
getppidprocess
Get the pid of this processes’ parent (see getpid(2)).
getresgiduser
Gets the real, effective, and saved group IDs.
getresuiduser
Gets the real, effective, and saved user IDs.
getsidprocess
Get the process group ID of a session leader getsid(2).
gettidprocess
Get the caller’s thread ID (see gettid(2).
getuiduser
Get a real user ID
initgroupsuser
Initialize the supplementary group access list.
isattyfs
Determines if the file descriptor refers to a valid terminal type device.
linkatfs
Link one file to another file
lseekfs
Move the read/write file offset.
lseek64fs
Move the read/write file offset.
mkdirfs
Creates new directory path with access rights mode. (see mkdir(2))
mkdtempfs and feature
Creates a directory which persists even after process termination
mkfifofs
Creates new FIFO special file (named pipe) with path path and access rights mode.
mkfifoatfs
Creates new FIFO special file (named pipe) with access rights set to mode in the path specified by dirfd and path.
mkstempfs
Creates a regular file which persists even after process termination
pathconffs and feature
Get path-dependent configurable system variables (see pathconf(2))
pausesignal
Suspend the thread until a signal is received.
pipe
Create an interprocess channel.
pipe2fs
Like pipe, but allows setting certain file descriptor flags.
pivot_rootfs
Change the root file system.
read
Read from a raw file descriptor.
setegiduser
Set the effective group ID
seteuiduser
Set the effective user ID
setfsgidfs and user
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.
setfsuidfs and user
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.
setgiduser
Set the group ID
setgroupsuser
Set the list of supplementary group IDs for the calling process.
sethostnamehostname
Set the system host name (see sethostname(2)).
setpgidprocess
Set a process group ID (see setpgid(2)).
setresgiduser
Sets the real, effective, and saved gid. (see setresuid(2))
setresuiduser
Sets the real, effective, and saved uid. (see setresuid(2))
setsidprocess
Create new session and set process group id (see setsid(2)).
setuiduser
Set the user ID
sleep
Suspend execution for an interval of time
symlinkatfs
Creates a symbolic link to path1 in the path specified by dirfd and path2.
syncfs
Commit filesystem caches to disk
syncfsfs
Commit filesystem caches containing file referred to by the open file descriptor fd to disk
sysconffeature
Get configurable system variables (see sysconf(3))
tcgetpgrpprocess and term
Get the terminal foreground process group (see tcgetpgrp(3)).
tcsetpgrpprocess and term
Set the terminal foreground process group (see tcgetpgrp(3)).
truncatefs
Truncate a file to a specified length
ttynameterm
Get the name of the terminal device that is open on file descriptor fd (see ttyname(3)).
unlinkfs
Remove a directory entry
unlinkatfs
Remove a directory entry
write
Write to a raw file descriptor.

Type Aliases§

FchownatFlagsuser and fs
LinkatFlagsfs