Module nix::unistd [] [src]

Safe wrappers around functions found in libc "unistd.h" header

Enums

ForkResult

Represents the successful result of calling fork

Whence

Functions

chdir

Change the current working directory of the calling process (see chdir(2)).

chown

Change the ownership of the file at path to be owned by the specified owner (user) and group (see chown(2)).

chroot
close
daemon

Daemonize this process by detaching from the controlling terminal (see daemon(3)).

dup

Create a copy of the specified file descriptor (see dup(2)).

dup2

Create a copy of the specified file descriptor using the specified fd (see dup(2)).

dup3

Create a new copy of the specified file descriptor using the specified fd and flags (see dup(2)).

execv

Replace the current process image with a new one (see exec(3)).

execve

Replace the current process image with a new one (see execve(2)).

execvp

Replace the current process image with a new one and replicate shell PATH searching behavior (see exec(3)).

fchdir

Change the current working directory of the process to the one given as an open file descriptor (see fchdir(2)).

fdatasync
fork

Create a new child process duplicating the parent process (see fork(2)).

fsync
ftruncate
getcwd

Returns the current directory as a PathBuf

getegid
geteuid
getgid
gethostname

Get the host name and store it in the provided buffer, returning a pointer the CStr in that buffer on success (see gethostname(2)).

getpgid
getpgrp

Get the group id of the calling process (see getpgrp(3)).

getpid

Get the pid of this process (see getpid(2)).

getppid

Get the pid of this processes' parent (see getpid(2)).

gettid

Get the caller's thread ID (see gettid(2).

getuid
isatty
lseek
lseek64
mkdir

Creates new directory path with access rights mode.

mkstemp

Creates a regular file which persists even after process termination

pause
pipe
pipe2
pivot_root
read
setgid
sethostname

Set the system host name (see gethostname(2)).

setpgid

Set a process group ID (see setpgid(2)).

setresgid

Sets the real, effective, and saved gid. (see setresuid(2))

setresuid

Sets the real, effective, and saved uid. (see setresuid(2))

setsid

Create new session and set process group id (see setsid(2)).

setuid
sleep
tcgetpgrp

Get the terminal foreground process group (see tcgetpgrp(3)).

tcsetpgrp

Set the terminal foreground process group (see tcgetpgrp(3)).

unlink
write