unistd.h
Description:
Provides functions and data structures related to process operations.
For example, you can use the functions to create and copy a process, and obtain a process ID.
Since:
1.0
Version:
1.0
pipe (int pipefd[2]) |
|
dup (int oldfd) |
|
Copies the descriptor of the target file to a specified descriptor. |
|
lseek (int fd, off_t offset, int whence) |
|
Synchronizes a file associated with a specified file descriptor to the storage device. |
|
read (int fd, void buf, size_t size) |
Reads the file contents and saves them in a specified buffer location. |
pread (int fd, void buf, size_t count, off_t offset) |
Reads data whose offset is offset and length is count from fd to the buffer. |
Writes data from the buffer to fd whose offset is offset and length is count. |
|
unlink (const char path) |
|
rmdir (const char path) |
|
Truncates a file to a specified size based on the file path. |
|
ftruncate (int fd, off_t length) |
|
chdir (const char path) |
Switches the current working directory to a specified directory. |
alarm (unsigned int seconds) |
Arranges a signal to be sent to the current process after the number of seconds specified by seconds. |
pause (void) |
|
Creates a new process that inherits from the user-mode data of its parent process. |
|
execve (const char path, char const arg[], char const envp[]) |
|
execle (const char path, const char arg,…) |
|
execvp (const char path, char const arg[]) |
|
_exit (int status) |
Exits the process immediately and closes all opened file descriptors in the process. |
getpid (void) |
|
getpgrp (void) |
|
Obtains the ID of the process group whose process ID is specified by pid. |
|
setpgid (pid_t pid, pid_t pgid) |
Sets the ID of the process group whose process ID is specified by pid. |
getuid (void) |
|
getgid (void) |
|
Obtains the effective group ID (GID) of the calling process. |
|
getgroups (int size, gid_t list[]) |
Obtains a list of supplementary user group IDs specific to the calling process. |
seteuid (uid_t euid) |
|
setegid (gid_t egid) |
|
setreuid (uid_t ruid, uid_t euid) |
Sets the real and effective user IDs of the calling process. |
Sets the real and effective user group IDs of the calling process. |
|
setpgrp (void) |
|
ualarm (unsigned value, unsigned interval) |
|
Sets the supplementary user group list of the calling process. |
|
setresuid (uid_t ruid, uid_t euid, uid_t suid) |
Sets the real, effective, and saved user IDs of the calling process. |
Sets the real, effective, and saved group IDs of the calling process. |
|
getresuid (uid_t ruid, uid_t euid, uid_t suid) |
Obtains the real, effective, and saved user IDs of the calling process. |
Obtains the real, effective, and saved user group IDs of the calling process. |
|
get_current_dir_name (void) |
|
getpagesize (void) |
|