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
close (int fd) |
|
dup2 (int oldfd, int newfd) |
Copies the descriptor of the target file to a specified descriptor. |
fsync (int fd) |
Synchronizes a file associated with a specified file descriptor to the storage device. |
Reads the file contents and saves them in a specified buffer location. |
|
write (int fd, const void buf, size_t size) |
|
Reads data whose offset is offset and length is count from fd to the buffer. |
|
pwrite (int fd, const void buf, size_t count, off_t offset) |
Writes data from the buffer to fd whose offset is offset and length is count. |
unlinkat (int fd, const char path, int flag) |
|
truncate (const char path, off_t length) |
Truncates a file to a specified size based on the file path. |
access (const char path, int mode) |
|
Switches the current working directory to a specified directory. |
|
getcwd (char buf, size_t size) |
|
Arranges a signal to be sent to the current process after the number of seconds specified by seconds. |
|
sleep (unsigned seconds) |
|
fork (void) |
Creates a new process that inherits from the user-mode data of its parent process. |
execv (const char path, char const arg[]) |
|
execl (const char path, const char arg,…) |
|
execlp (const char path, const char arg,…) |
|
Exits the process immediately and closes all opened file descriptors in the process. |
|
swab (const void from, void to, ssize_t n) |
|
getppid (void) |
|
getpgid (pid_t pid) |
Obtains the ID of the process group whose process ID is specified by pid. |
Sets the ID of the process group whose process ID is specified by pid. |
|
getopt (int argc, char const argv[], const char optstring) |
|
geteuid (void) |
|
getegid (void) |
Obtains the effective group ID (GID) of the calling process. |
Obtains a list of supplementary user group IDs specific to the calling process. |
|
setuid (uid_t uid) |
|
setgid (gid_t gid) |
|
pathconf (const char path, int name) |
|
Sets the real and effective user IDs of the calling process. |
|
setregid (gid_t rgid, gid_t egid) |
Sets the real and effective user group IDs of the calling process. |
usleep (unsigned useconds) |
|
setgroups (size_t size, const gid_t list) |
Sets the supplementary user group list of the calling process. |
Sets the real, effective, and saved user IDs of the calling process. |
|
setresgid (gid_t rgid, gid_t egid, gid_t sgid) |
Sets the real, effective, and saved group IDs of the calling process. |
Obtains the real, effective, and saved user IDs of the calling process. |
|
getresgid (gid_t rgid, gid_t egid, gid_t sgid) |
Obtains the real, effective, and saved user group IDs of the calling process. |
sbrk (intptr_t increment) |
|
chown (const char pathname, uid_t owner, gid_t group) |