|
accept(2) -- accept a connection on a socket
|
The argument s is a socket that has been created with socket(2), bound to an address with bind(2), and is listening for connections after a listen(2). The accept() system call extracts the first conne... |
access(2) -- check accessibility of a file
|
The access() and eaccess() system calls check the accessibility of the file named by the path argument for the access permissions indicated by the mode argument. The value of mode is either the bitwis... |
|
acct(2) -- enable or disable process accounting
|
The acct() system call enables or disables the collection of system accounting records. If the argument file is a nil pointer, accounting is disabled. If file is an existing pathname (null-terminated)... |
adjtime(2) -- correct the time to allow synchronization of the system clock
|
The adjtime() system call makes small adjustments to the system time, as returned by gettimeofday(2), advancing or retarding it by the time specified by the timeval delta. If delta is negative, the cl... |
aio_cancel(2) -- cancel an outstanding asynchronous I/O operation (REALTIME)
|
The aio_cancel() system call cancels the outstanding asynchronous I/O request for the file descriptor specified in fildes. If iocb is specified, only that specific asynchronous I/O request is cancelle... |
aio_error(2) -- retrieve error status of asynchronous I/O operation (REALTIME)
|
The aio_error() system call returns the error status of the asynchronous I/O request associated with the structure pointed to by iocb. |
aio_read(2) -- asynchronous read from a file (REALTIME)
|
The aio_read() system call allows the calling process to read iocb->aio_nbytes from the descriptor iocb->aio_fildes beginning at the offset iocb->aio_offset into the buffer pointed to by iocb->aio_buf... |
aio_return(2) -- retrieve return status of asynchronous I/O operation (REALTIME)
|
The aio_return() system call returns the final status of the asynchronous I/O request associated with the structure pointed to by iocb. The aio_return() system call should only be called once, to obta... |
aio_suspend(2) -- suspend until asynchronous I/O operations or timeout complete (REALTIME)
|
The aio_suspend() system call suspends the calling process until at least one of the specified asynchronous I/O requests have completed, a signal is delivered, or the timeout has passed. The iocbs arg... |
aio_waitcomplete(2) -- wait for the next completion of an aio request
|
The aio_waitcomplete() system call waits for completion of an asynchronous I/O request. Upon completion, aio_waitcomplete() returns the result of the function and sets iocbp to point to the structure ... |
aio_write(2) -- asynchronous write to a file (REALTIME)
|
The aio_write() system call allows the calling process to write iocb->aio_nbytes from the buffer pointed to by iocb->aio_buf to the descriptor iocb->aio_fildes. The call returns immediately after the ... |
bind(2) -- assign a local protocol address to a socket
|
The bind() system call assigns the local protocol address to a socket. When a socket is created with socket(2) it exists in an address family space but has no protocol address assigned. The bind() sys... |
brk(2) -- change data segment size
|
The brk() and sbrk() functions are legacy interfaces from before the advent of modern virtual memory management. The brk() and sbrk() functions are used to change the amount of memory allocated in a p... |
chdir(2) -- change current working directory
|
The path argument points to the pathname of a directory. The chdir() system call causes the named directory to become the current working directory, that is, the starting point for path searches of pa... |
chflags(2) -- set file flags
|
The file whose name is given by path or referenced by the descriptor fd has its flags changed to flags. The lchflags() system call is like chflags() except in the case where the named file is a symbol... |
chmod(2) -- change mode of file
|
The file permission bits of the file named specified by path or referenced by the file descriptor fd are changed to mode. The chmod() system call verifies that the process owner (user) either owns the... |
chown(2) -- change owner and group of a file
|
The owner ID and group ID of the file named by path or referenced by fd is changed as specified by the arguments owner and group. The owner of a file may change the group to a group of which he or she... |
chroot(2) -- change root directory
|
The dirname argument is the address of the pathname of a directory, terminated by an ASCII NUL. The chroot() system call causes dirname to become the root directory, that is, the starting point for pa... |
clock_getres(2) -- get/set/calibrate date and time
|
The clock_gettime() and clock_settime() allow the calling process to retrieve or set the value used by a clock which is specifed by clock_id. The clock_id argument can be one of four values: CLOCK_REA... |
clock_gettime(2) -- get/set/calibrate date and time
|
The clock_gettime() and clock_settime() allow the calling process to retrieve or set the value used by a clock which is specifed by clock_id. The clock_id argument can be one of four values: CLOCK_REA... |
clock_settime(2) -- get/set/calibrate date and time
|
The clock_gettime() and clock_settime() allow the calling process to retrieve or set the value used by a clock which is specifed by clock_id. The clock_id argument can be one of four values: CLOCK_REA... |
close(2) -- delete a descriptor
|
The close() system call deletes a descriptor from the per-process object reference table. If this is the last reference to the underlying object, the object will be deactivated. For example, on the la... |
connect(2) -- initiate a connection on a socket
|
The s argument is a socket. If it is of type SOCK_DGRAM, this call specifies the peer with which the socket is to be associated; this address is that to which datagrams are to be sent, and the only ad... |
creat(2) -- create a new file
|
This interface is made obsolete by: open(2). The creat() function is the same as: open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); |
dup(2) -- duplicate an existing file descriptor
|
The dup() system call duplicates an existing object descriptor and returns its value to the calling process (newd = dup(oldd)). The argument oldd is a small non-negative integer index in the per-proce... |
dup2(2) -- duplicate an existing file descriptor
|
The dup() system call duplicates an existing object descriptor and returns its value to the calling process (newd = dup(oldd)). The argument oldd is a small non-negative integer index in the per-proce... |
eaccess(2) -- check accessibility of a file
|
The access() and eaccess() system calls check the accessibility of the file named by the path argument for the access permissions indicated by the mode argument. The value of mode is either the bitwis... |
errno(2) -- introduction to system calls and error numbers
|
This section provides an overview of the system calls, their error returns, and other common definitions and concepts. |
execve(2) -- execute a file
|
The execve() system call transforms the calling process into a new process. The new process is constructed from an ordinary file, whose name is pointed to by path, called the new process file. This fi... |
extattr(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_delete_fd(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_delete_file(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_get_fd(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_get_file(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_set_fd(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
extattr_set_file(2) -- system calls to manipulate VFS extended attributes
|
Named extended attributes are meta-data associated with vnodes representing files and directories. They exist as "name=value" pairs within a set of namespaces. The extattr_get_file() system call ret... |
fchdir(2) -- change current working directory
|
The path argument points to the pathname of a directory. The chdir() system call causes the named directory to become the current working directory, that is, the starting point for path searches of pa... |
fchflags(2) -- set file flags
|
The file whose name is given by path or referenced by the descriptor fd has its flags changed to flags. The lchflags() system call is like chflags() except in the case where the named file is a symbol... |
fchmod(2) -- change mode of file
|
The file permission bits of the file named specified by path or referenced by the file descriptor fd are changed to mode. The chmod() system call verifies that the process owner (user) either owns the... |
fchown(2) -- change owner and group of a file
|
The owner ID and group ID of the file named by path or referenced by fd is changed as specified by the arguments owner and group. The owner of a file may change the group to a group of which he or she... |
fcntl(2) -- file control
|
The fcntl() system call provides for control over descriptors. The argument fd is a descriptor to be operated on by cmd as described below. Depending on the value of cmd, fcntl() can take an additiona... |
fhopen(2) -- access file via file handle
|
These system calls provide a means to access a file given the file handle fhp. As this method bypasses directory access restrictions, these calls are restricted to the superuser. The fhopen() system c... |
fhstat(2) -- access file via file handle
|
These system calls provide a means to access a file given the file handle fhp. As this method bypasses directory access restrictions, these calls are restricted to the superuser. The fhopen() system c... |
fhstatfs(2) -- access file via file handle
|
These system calls provide a means to access a file given the file handle fhp. As this method bypasses directory access restrictions, these calls are restricted to the superuser. The fhopen() system c... |
flock(2) -- apply or remove an advisory lock on an open file
|
The flock() system call applies or removes an advisory lock on the file associated with the file descriptor fd. A lock is applied by specifying an operation argument that is one of LOCK_SH or LOCK_EX ... |
fork(2) -- create a new process
|
The fork() system call causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process) except for the following: +o The child process has a u... |
fpathconf(2) -- get configurable pathname variables
|
The pathconf() and fpathconf() system calls provide a method for applications to determine the current value of a configurable system limit or option variable associated with a pathname or file descri... |
fstat(2) -- get file status
|
The stat() system call obtains information about the file pointed to by path. Read, write or execute permission of the named file is not required, but all directories listed in the path name leading t... |
fstatfs(2) -- get file system statistics
|
The statfs() system call returns information about a mounted file system. The path argument is the path name of any file within the mounted file system. The buf argument is a pointer to a statfs struc... |
fsync(2) -- synchronise changes to a file
|
The fsync() system call causes all modified data and attributes of fd to be moved to a permanent storage device. This normally results in all incore modified copies of buffers for the associated file ... |
ftruncate(2) -- truncate or extend a file to a specified length
|
The truncate() system call causes the file named by path or referenced by fd to be truncated or extended to length bytes in size. If the file was larger than this size, the extra data is lost. If the ... |
futimes(2) -- set file access and modification times
|
The access and modification times of the file named by path or referenced by fd are changed as specified by the argument times. If times is NULL, the access and modification times are set to the curre... |
getdents(2) -- get directory entries in a file system independent format
|
The getdirentries() and getdents() system calls read directory entries from the directory referenced by the file descriptor fd into the buffer pointed to by buf, in a file system independent format. U... |
getdirentries(2) -- get directory entries in a file system independent format
|
The getdirentries() and getdents() system calls read directory entries from the directory referenced by the file descriptor fd into the buffer pointed to by buf, in a file system independent format. U... |
getdtablesize(2) -- get descriptor table size
|
Each process has a fixed size descriptor table, which is guaranteed to have at least 20 slots. The entries in the descriptor table are numbered with small integers starting at 0. The getdtablesize() s... |
getegid(2) -- get group process identification
|
The getgid() system call returns the real group ID of the calling process, getegid() returns the effective group ID of the calling process. The real group ID is specified at login time. The real group... |
geteuid(2) -- get user identification
|
The getuid() system call returns the real user ID of the calling process. The geteuid() system call returns the effective user ID of the calling process. The real user ID is that of the user who has i... |
getfh(2) -- get file handle
|
The getfh() system call returns a file handle for the specified file or directory in the file handle pointed to by fhp. This system call is restricted to the superuser. |
getfsstat(2) -- get list of all mounted file systems
|
The getfsstat() system call returns information about all mounted file systems. The buf argument is a pointer to statfs structures, as described in statfs(2). Fields that are undefined for a particula... |
getgid(2) -- get group process identification
|
The getgid() system call returns the real group ID of the calling process, getegid() returns the effective group ID of the calling process. The real group ID is specified at login time. The real group... |
getgroups(2) -- get group access list
|
The getgroups() system call gets the current group access list of the user process and stores it in the array gidset. The gidsetlen argument indicates the number of entries that may be placed in gidse... |
getitimer(2) -- get/set value of interval timer
|
The system provides each process with three interval timers, defined in . The getitimer() system call returns the current value for the timer specified in which in the structure at value. ... |
getlogin(2) -- get/set login name
|
The getlogin() routine returns the login name of the user associated with the current session, as previously set by setlogin(). The name is normally associated with a login shell at the time a session... |
getpeername(2) -- get name of connected peer
|
The getpeername() system call returns the name of the peer connected to socket s. The namelen argument should be initialized to indicate the amount of space pointed to by name. On return it contains t... |
getpgid(2) -- get process group
|
The process group of the current process is returned by getpgrp(). The process group of the process identified by pid is returned by getpgid(). If pid is zero, getpgid() returns the process group of t... |
getpgrp(2) -- get process group
|
The process group of the current process is returned by getpgrp(). The process group of the process identified by pid is returned by getpgid(). If pid is zero, getpgid() returns the process group of t... |
getpid(2) -- get parent or calling process identification
|
The getpid() system call returns the process ID of the calling process. Though the ID is guaranteed to be unique, it should NOT be used for constructing temporary file names, for security reasons; see... |
getppid(2) -- get parent or calling process identification
|
The getpid() system call returns the process ID of the calling process. Though the ID is guaranteed to be unique, it should NOT be used for constructing temporary file names, for security reasons; see... |
getpriority(2) -- get/set program scheduling priority
|
The scheduling priority of the process, process group, or user, as indicated by which and who is obtained with the getpriority() system call and set with the setpriority() system call. The which argum... |
getresgid(2) -- get or set real, effective and saved user or group ID
|
The setresuid() system call sets the real, effective and saved user IDs of the current process. The analogous setresgid() sets the real, effective and saved group IDs. Privileged processes may set the... |
getresuid(2) -- get or set real, effective and saved user or group ID
|
The setresuid() system call sets the real, effective and saved user IDs of the current process. The analogous setresgid() sets the real, effective and saved group IDs. Privileged processes may set the... |
getrlimit(2) -- control maximum system resource consumption
|
Limits on the consumption of system resources by the current process and each process it creates may be obtained with the getrlimit() system call, and set with the setrlimit() system call. The resourc... |
getrusage(2) -- get information about resource utilization
|
The getrusage() system call returns information describing the resources utilized by the current process, or all its terminated child processes. The who argument is either RUSAGE_SELF or RUSAGE_CHILDR... |
getsid(2) -- get process session
|
The session ID of the process identified by pid is returned by getsid(). If pid is zero, getsid() returns the session ID of the current process. |
getsockname(2) -- get socket name
|
The getsockname() system call returns the current name for the specified socket. The namelen argument should be initialized to indicate the amount of space pointed to by name. On return it contains th... |
getsockopt(2) -- get and set options on sockets
|
The getsockopt() and setsockopt() system calls manipulate the options associated with a socket. Options may exist at multiple protocol levels; they are always present at the uppermost ``socket'' lev... |
gettimeofday(2) -- get/set date and time
|
Note: timezone is no longer used; this information is kept outside the kernel. The system's notion of the current Greenwich time and the current time zone is obtained with the gettimeofday() system c... |
getuid(2) -- get user identification
|
The getuid() system call returns the real user ID of the calling process. The geteuid() system call returns the effective user ID of the calling process. The real user ID is that of the user who has i... |
i386_get_ioperm(2) -- manage per-process access to the i386 I/O port space
|
The i386_get_ioperm() system call will return the permission for the process' I/O port space in the *enable argument. The port range starts at start and the number of contiguous entries will be retur... |
i386_get_ldt(2) -- manage i386 per-process Local Descriptor Table entries
|
The i386_get_ldt() system call will return the list of i386 descriptors that the process has in its LDT. The i386_set_ldt() system call will set a list of i386 descriptors for the current process in i... |
i386_set_ioperm(2) -- manage per-process access to the i386 I/O port space
|
The i386_get_ioperm() system call will return the permission for the process' I/O port space in the *enable argument. The port range starts at start and the number of contiguous entries will be retur... |
i386_set_ldt(2) -- manage i386 per-process Local Descriptor Table entries
|
The i386_get_ldt() system call will return the list of i386 descriptors that the process has in its LDT. The i386_set_ldt() system call will set a list of i386 descriptors for the current process in i... |
i386_vm86(2) -- control vm86-related functions
|
The i386_vm86() system call is used to call various vm86 related functions. The function argument can be one of the following values: VM86_INIT This will initialize the kernel's vm86 parameter area f... |
intro(2) -- introduction to system calls and error numbers
|
This section provides an overview of the system calls, their error returns, and other common definitions and concepts. |
ioctl(2) -- control device
|
The ioctl() system call manipulates the underlying device parameters of special files. In particular, many operating characteristics of character special files (e.g. terminals) may be controlled with ... |
issetugid(2) -- is current process tainted by uid or gid changes
|
The issetugid() system call returns 1 if the process environment or memory address space is considered ``tainted'', and returns 0 otherwise. A process is tainted if it was created as a result of an ... |
jail(2) -- imprison current process and future decendants
|
The jail() system call sets up a jail and locks the current process in it. The argument is a pointer to a structure describing the prison: struct jail { u_int32_t version; char *path; char *hostname; ... |
jail_attach(2) -- imprison current process and future decendants
|
The jail() system call sets up a jail and locks the current process in it. The argument is a pointer to a structure describing the prison: struct jail { u_int32_t version; char *path; char *hostname; ... |
kenv(2) -- kernel environment
|
The kenv() system call manipulates kernel environment variables. It supports the well known userland actions of getting, setting and unsetting environment variables, as well as the ability to dump all... |
kevent(2) -- kernel event notification mechanism
|
The kqueue() system call provides a generic method of notifying the user when an event happens or a condition holds, based on the results of small pieces of kernel code termed filters. A kevent is ide... |
kill(2) -- send signal to a process
|
The kill() system call sends the signal given by sig to pid, a process or a group of processes. The sig argument may be one of the signals specified in sigaction(2) or it may be 0, in which case error... |
killpg(2) -- send signal to a process group
|
The killpg() function sends the signal sig to the process group pgrp. See sigaction(2) for a list of signals. If pgrp is 0, killpg() sends the signal to the sending process's process group. The sendi... |
kldfind(2) -- returns the fileid of a kld file
|
The kldfind() system call returns the fileid of the kld file referenced by file. |
kldfirstmod(2) -- return first module id from the kld file specified
|
The kldfirstmod() system call returns the module id pertaining to the first module referenced by fileid. |
kldload(2) -- load KLD files into the kernel
|
The kldload() system call loads a kld file into the kernel using the kernel linker. |
kldnext(2) -- return the fileid of the next kld file
|
The kldnext() system call returns the fileid of the next kld file (that is, the one after fileid) or 0 if fileid is the last file loaded. |
kldstat(2) -- get status of kld file
|
The kldstat() system call writes the info for the file referred to by fileid into stat. struct kld_file_stat { int version; /* set to sizeof(linker_file_stat) */ char name[MAXPATHLEN]; int refs; int i... |
kldsym(2) -- look up address by symbol name in a KLD
|
The kldsym() system call returns the address of the symbol specified in data in the module specified by fileid. If fileid is 0, all loaded modules are searched. Currently, the only command implemented... |
kldunload(2) -- unload kld files
|
The kldunload() system call unloads a kld file from the kernel that was previously linked via kldload(2). |
kqueue(2) -- kernel event notification mechanism
|
The kqueue() system call provides a generic method of notifying the user when an event happens or a condition holds, based on the results of small pieces of kernel code termed filters. A kevent is ide... |
kse(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
kse_create(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
kse_exit(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
kse_release(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
kse_thr_interrupt(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
kse_wakeup(2) -- kernel support for user threads
|
These system calls implement kernel support for multi-threaded processes. Overview [Toc] [Back] Traditionally, user threading has been implemented in one of two ways: either all threads are mana... |
ktrace(2) -- process tracing
|
The ktrace() system call enables or disables tracing of one or more processes. Users may only trace their own processes. Only the super-user can trace setuid or setgid programs. The tracefile argument... |
lchflags(2) -- set file flags
|
The file whose name is given by path or referenced by the descriptor fd has its flags changed to flags. The lchflags() system call is like chflags() except in the case where the named file is a symbol... |
lchmod(2) -- change mode of file
|
The file permission bits of the file named specified by path or referenced by the file descriptor fd are changed to mode. The chmod() system call verifies that the process owner (user) either owns the... |
lchown(2) -- change owner and group of a file
|
The owner ID and group ID of the file named by path or referenced by fd is changed as specified by the arguments owner and group. The owner of a file may change the group to a group of which he or she... |
link(2) -- make a hard file link
|
The link() system call atomically creates the specified directory entry (hard link) name2 with the attributes of the underlying object pointed at by name1. If the link is successful: the link count of... |
lio_listio(2) -- list directed I/O (REALTIME)
|
The lio_listio() function initiates a list of I/O requests with a single function call. The list argument is an array of pointers to aiocb structures describing each operation to perform, with nent el... |
listen(2) -- listen for connections on a socket
|
To accept connections, a socket is first created with socket(2), a willingness to accept incoming connections and a queue limit for incoming connections are specified with listen(), and then the conne... |
lseek(2) -- reposition read/write file offset
|
The lseek() system call repositions the offset of the file descriptor fildes to the argument offset according to the directive whence. The argument fildes must be an open file descriptor. The lseek() ... |
lstat(2) -- get file status
|
The stat() system call obtains information about the file pointed to by path. Read, write or execute permission of the named file is not required, but all directories listed in the path name leading t... |
lutimes(2) -- set file access and modification times
|
The access and modification times of the file named by path or referenced by fd are changed as specified by the argument times. If times is NULL, the access and modification times are set to the curre... |
madvise(2) -- give advice about use of memory
|
The madvise() system call allows a process that has knowledge of its memory behavior to describe it to the system. The posix_madvise() interface is identical and is provided for standards conformance.... |
mincore(2) -- determine residency of memory pages
|
The mincore() system call determines whether each of the pages in the region beginning at addr and continuing for len bytes is resident. The status is returned in the vec array, one character per page... |
minherit(2) -- control the inheritance of pages
|
The minherit() system call changes the specified pages to have the inheritance characteristic inherit. Not all implementations will guarantee that the inheritance characteristic can be set on a page b... |
mkdir(2) -- make a directory file
|
The directory path is created with the access permissions specified by mode and restricted by the umask(2) of the calling process. The directory's owner ID is set to the process's effective user ID.... |
mkfifo(2) -- make a fifo file
|
The mkfifo() system call creates a new fifo file with name path. The access permissions are specified by mode and restricted by the umask(2) of the calling process. The fifo's owner ID is set to the ... |
mknod(2) -- make a special file node
|
The file system node path is created with the file type and access permissions specified in mode. The access permissions are modified by the process's umask value. If mode indicates a block or charac... |
mlock(2) -- lock (unlock) physical pages in memory
|
The mlock() system call locks into memory the physical pages associated with the virtual address range starting at addr for len bytes. The munlock() system call unlocks pages previously locked by one ... |
mlockall(2) -- lock (unlock) the address space of a process
|
The mlockall system call locks into memory the physical pages associated with the address space of a process until the address space is unlocked, the process exits, or execs another program image. The... |
mmap(2) -- allocate memory, or map files or devices into memory
|
The mmap() system call causes the pages starting at addr and continuing for at most len bytes to be mapped from the object described by fd, starting at byte offset offset. If len is not a multiple of ... |
modfind(2) -- returns the modid of a kernel module
|
The modfind() system call returns the modid of the kernel module referenced by modname. |
modfnext(2) -- return the modid of the next kernel module
|
The modnext() system call returns the modid of the next kernel module (that is, the one after modid) or 0 if modid is the last module in the list. If the modid value is 0, then modnext() will return t... |
modnext(2) -- return the modid of the next kernel module
|
The modnext() system call returns the modid of the next kernel module (that is, the one after modid) or 0 if modid is the last module in the list. If the modid value is 0, then modnext() will return t... |
modstat(2) -- get status of kernel module
|
The modstat() system call writes the info for the kernel module referred to by modid into stat. struct module_stat { int version; /* set to sizeof(module_stat) */ char name[MAXPATHLEN]; int refs; int ... |
mount(2) -- mount or dismount a file system
|
The mount() system call grafts a file system object onto the system file tree at the point dir. The argument data describes the file system object to be mounted. The argument type tells the kernel how... |
mprotect(2) -- control the protection of pages
|
The mprotect() system call changes the specified pages to have protection prot. Not all implementations will guarantee protection on a page basis; the granularity of protection changes may be as large... |
msync(2) -- synchronize a mapped region
|
The msync() system call writes any modified pages back to the file system and updates the file modification time. If len is 0, all modified pages within the region containing addr will be flushed; if ... |
munlock(2) -- lock (unlock) physical pages in memory
|
The mlock() system call locks into memory the physical pages associated with the virtual address range starting at addr for len bytes. The munlock() system call unlocks pages previously locked by one ... |
munlockall(2) -- lock (unlock) the address space of a process
|
The mlockall system call locks into memory the physical pages associated with the address space of a process until the address space is unlocked, the process exits, or execs another program image. The... |
munmap(2) -- remove a mapping
|
The munmap() system call deletes the mappings for the specified address range, and causes further references to addresses within the range to generate invalid memory references. |
nanosleep(2) -- suspend process execution for an interval measured in nanoseconds
|
The nanosleep() system call causes the process to sleep for the specified time. An unmasked signal will cause it to terminate the sleep early, regardless of the SA_RESTART value on the interrupting si... |
nfssvc(2) -- NFS services
|
The nfssvc() system call is used by the NFS daemons to pass information into and out of the kernel and also to enter the kernel as a server daemon. The flags argument consists of several bits that sho... |
ntp_adjtime(2) -- NTP daemon application interface
|
The ntp_adjtime() system call is used as a kernel interface for the Network Time Protocol daemon, ntpd(8). Certain fields of the timex structure are interpreted in either microseconds or nanoseconds, ... |
ntp_gettime(2) -- NTP user application interface
|
The time returned by ntp_gettime() is in a timespec structure, but may be in either microsecond (seconds and microseconds) or nanosecond (seconds and nanoseconds) format. The particular format in use ... |
open(2) -- open or create a file for reading or writing
|
The file name specified by path is opened for reading and/or writing as specified by the argument flags and the file descriptor returned to the calling process. The flags argument may indicate the fil... |
pathconf(2) -- get configurable pathname variables
|
The pathconf() and fpathconf() system calls provide a method for applications to determine the current value of a configurable system limit or option variable associated with a pathname or file descri... |
pipe(2) -- create descriptor pair for interprocess communication
|
The pipe() system call creates a pipe, which is an object allowing bidirectional data flow, and allocates a pair of file descriptors. By convention, the first descriptor is normally used as the read e... |
poll(2) -- synchronous I/O multiplexing
|
The poll() system call examines a set of file descriptors to see if some of them are ready for I/O. The fds argument is a pointer to an array of pollfd structures as defined in (shown below).... |
posix_madvise(2) -- give advice about use of memory
|
The madvise() system call allows a process that has knowledge of its memory behavior to describe it to the system. The posix_madvise() interface is identical and is provided for standards conformance.... |
pread(2) -- read input
|
The read() system call attempts to read nbytes of data from the object referenced by the descriptor d into the buffer pointed to by buf. The readv() system call performs the same action, but scatters ... |
profil(2) -- control process profiling
|
The profil() system call enables or disables program counter profiling of the current process. If profiling is enabled, then at every profiling clock tick, the kernel updates an appropriate count in t... |
ptrace(2) -- process tracing and debugging
|
The ptrace() system call provides tracing and debugging facilities. It allows one process (the tracing process) to control another (the traced process). Most of the time, the traced process runs norma... |
pwrite(2) -- write output
|
The write() system call attempts to write nbytes of data to the object referenced by the descriptor d from the buffer pointed to by buf. The writev() system call performs the same action, but gathers ... |
quotactl(2) -- manipulate file system quotas
|
The quotactl() system call enables, disables and manipulates file system quotas. A quota control command given by cmd operates on the given filename path for the given user id. (NOTE: One should use t... |
read(2) -- read input
|
The read() system call attempts to read nbytes of data from the object referenced by the descriptor d into the buffer pointed to by buf. The readv() system call performs the same action, but scatters ... |
readlink(2) -- read value of a symbolic link
|
The readlink() system call places the contents of the symbolic link path in the buffer buf, which has size bufsiz. The readlink() system call does not append a NUL character to buf. |
readv(2) -- read input
|
The read() system call attempts to read nbytes of data from the object referenced by the descriptor d into the buffer pointed to by buf. The readv() system call performs the same action, but scatters ... |
reboot(2) -- reboot system or halt processor
|
The reboot() system call reboots the system. Only the super-user may reboot a machine on demand. However, a reboot is invoked automatically in the event of unrecoverable system failures. The howto arg... |
recv(2) -- receive a message from a socket
|
The recvfrom() and recvmsg() system calls are used to receive messages from a socket, and may be used to receive data on a socket whether or not it is connection-oriented. If from is non-nil, and the ... |
recvfrom(2) -- receive a message from a socket
|
The recvfrom() and recvmsg() system calls are used to receive messages from a socket, and may be used to receive data on a socket whether or not it is connection-oriented. If from is non-nil, and the ... |
recvmsg(2) -- receive a message from a socket
|
The recvfrom() and recvmsg() system calls are used to receive messages from a socket, and may be used to receive data on a socket whether or not it is connection-oriented. If from is non-nil, and the ... |
rename(2) -- change the name of a file
|
The rename() system call causes the link named from to be renamed as to. If to exists, it is first removed. Both from and to must be of the same type (that is, both directories or both non-directories... |
revoke(2) -- revoke file access
|
The revoke() system call invalidates all current open file descriptors in the system for the file named by path. Subsequent operations on any such descriptors fail, with the exceptions that a read() f... |
rfork(2) -- manipulate process resources
|
Forking, vforking or rforking are the only ways new processes are created. The flags argument to rfork() selects which resources of the invoking process (parent) are shared by the new process (child) ... |
rmdir(2) -- remove a directory file
|
The rmdir() system call removes a directory file whose name is given by path. The directory must not have any entries other than `.' and `..'. |
rtprio(2) -- examine or modify a process realtime or idle priority
|
The rtprio() system call is used to lookup or change the realtime or idle priority of a process. The function argument specifies the operation to be performed. RTP_LOOKUP to lookup the current priorit... |
sbrk(2) -- change data segment size
|
The brk() and sbrk() functions are legacy interfaces from before the advent of modern virtual memory management. The brk() and sbrk() functions are used to change the amount of memory allocated in a p... |
sched_getparam(2) -- set/get scheduling parameters
|
The sched_setparam() system call sets the scheduling parameters of the process specified by pid to the values specified by the sched_param structure pointed to by param. The value of the sched_priorit... |
sched_getscheduler(2) -- set/get scheduling policy and scheduler parameters
|
The sched_setscheduler() system call sets the scheduling policy and scheduling parameters of the process specified by pid to policy and the parameters specified in the sched_param structure pointed to... |
sched_get_priority_max(2) -- get scheduling parameter limits
|
The sched_get_priority_max() and sched_get_priority_min() system calls return the appropriate maximum or minimum, respectively, for the scheduling policy specified by policy. The sched_rr_get_interval... |
sched_get_priority_min(2) -- get scheduling parameter limits
|
The sched_get_priority_max() and sched_get_priority_min() system calls return the appropriate maximum or minimum, respectively, for the scheduling policy specified by policy. The sched_rr_get_interval... |
sched_rr_get_interval(2) -- get scheduling parameter limits
|
The sched_get_priority_max() and sched_get_priority_min() system calls return the appropriate maximum or minimum, respectively, for the scheduling policy specified by policy. The sched_rr_get_interval... |
sched_setparam(2) -- set/get scheduling parameters
|
The sched_setparam() system call sets the scheduling parameters of the process specified by pid to the values specified by the sched_param structure pointed to by param. The value of the sched_priorit... |
sched_setscheduler(2) -- set/get scheduling policy and scheduler parameters
|
The sched_setscheduler() system call sets the scheduling policy and scheduling parameters of the process specified by pid to policy and the parameters specified in the sched_param structure pointed to... |
sched_yield(2) -- yield processor
|
The sched_yield() system call forces the running process to relinquish the processor until it again becomes the head of its process list. It takes no arguments. |
select(2) -- synchronous I/O multiplexing
|
The select() system call examines the I/O descriptor sets whose addresses are passed in readfds, writefds, and exceptfds to see if some of their descriptors are ready for reading, are ready for writin... |
semctl(2) -- control operations on a semaphore set
|
The semctl() system call performs the operation indicated by cmd on the semaphore set indicated by semid. A fourth argument, a union semun arg, is required for certain values of cmd. For the commands ... |
semget(2) -- obtain a semaphore id
|
Based on the values of key and flag, semget() returns the identifier of a newly created or previously existing set of semaphores. The key is analogous to a filename: it provides a handle that names an... |
semop(2) -- atomic array of operations on a semaphore set
|
The semop() system call atomically performs the array of operations indicated by array on the semaphore set indicated by semid. The length of array is indicated by nops. Each operation is encoded in a... |
send(2) -- send a message from a socket
|
The send() function, and sendto() and sendmsg() system calls are used to transmit a message to another socket. The send() function may be used only when the socket is in a connected state, while sendt... |
sendfile(2) -- send a file to a socket
|
The sendfile() system call sends a regular file specified by descriptor fd out a stream socket specified by descriptor s. The offset argument specifies where to begin in the file. The nbytes argument ... |
sendmsg(2) -- send a message from a socket
|
The send() function, and sendto() and sendmsg() system calls are used to transmit a message to another socket. The send() function may be used only when the socket is in a connected state, while sendt... |
sendto(2) -- send a message from a socket
|
The send() function, and sendto() and sendmsg() system calls are used to transmit a message to another socket. The send() function may be used only when the socket is in a connected state, while sendt... |
setegid(2) -- set user and group ID
|
The setuid() system call sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The setuid() system call is permitted if the specified ID is equa... |
seteuid(2) -- set user and group ID
|
The setuid() system call sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The setuid() system call is permitted if the specified ID is equa... |
setgid(2) -- set user and group ID
|
The setuid() system call sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The setuid() system call is permitted if the specified ID is equa... |
setgroups(2) -- set group access list
|
The setgroups() system call sets the group access list of the current user process according to the array gidset. The ngroups argument indicates the number of entries in the array and must be no more ... |
setitimer(2) -- get/set value of interval timer
|
The system provides each process with three interval timers, defined in . The getitimer() system call returns the current value for the timer specified in which in the structure at value. ... |
setlogin(2) -- get/set login name
|
The getlogin() routine returns the login name of the user associated with the current session, as previously set by setlogin(). The name is normally associated with a login shell at the time a session... |
setpgid(2) -- set process group
|
The setpgid() system call sets the process group of the specified process pid to the specified pgrp. If pid is zero, then the call applies to the current process. If the invoker is not the super-user,... |
setpgrp(2) -- set process group
|
The setpgid() system call sets the process group of the specified process pid to the specified pgrp. If pid is zero, then the call applies to the current process. If the invoker is not the super-user,... |
setpriority(2) -- get/set program scheduling priority
|
The scheduling priority of the process, process group, or user, as indicated by which and who is obtained with the getpriority() system call and set with the setpriority() system call. The which argum... |
setregid(2) -- set real and effective group ID
|
The real and effective group ID's of the current process are set to the arguments. If the real group ID is changed, the saved group ID is changed to the new value of the effective group ID. Unprivile... |
setresgid(2) -- get or set real, effective and saved user or group ID
|
The setresuid() system call sets the real, effective and saved user IDs of the current process. The analogous setresgid() sets the real, effective and saved group IDs. Privileged processes may set the... |
setresuid(2) -- get or set real, effective and saved user or group ID
|
The setresuid() system call sets the real, effective and saved user IDs of the current process. The analogous setresgid() sets the real, effective and saved group IDs. Privileged processes may set the... |
setreuid(2) -- set real and effective user ID's
|
The real and effective user IDs of the current process are set according to the arguments. If ruid or euid is -1, the current uid is filled in by the system. Unprivileged users may change the real use... |
setrlimit(2) -- control maximum system resource consumption
|
Limits on the consumption of system resources by the current process and each process it creates may be obtained with the getrlimit() system call, and set with the setrlimit() system call. The resourc... |
setsid(2) -- create session and set process group ID
|
The setsid() system call creates a new session. The calling process is the session leader of the new session, is the process group leader of a new process group and has no controlling terminal. The ca... |
setsockopt(2) -- get and set options on sockets
|
The getsockopt() and setsockopt() system calls manipulate the options associated with a socket. Options may exist at multiple protocol levels; they are always present at the uppermost ``socket'' lev... |
settimeofday(2) -- get/set date and time
|
Note: timezone is no longer used; this information is kept outside the kernel. The system's notion of the current Greenwich time and the current time zone is obtained with the gettimeofday() system c... |
setuid(2) -- set user and group ID
|
The setuid() system call sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The setuid() system call is permitted if the specified ID is equa... |
shmat(2) -- attach or detach shared memory
|
The shmat() system call attaches the shared memory segment identified by shmid to the calling process's address space. The address where the segment is attached is determined as follows: +o If addr i... |
shmctl(2) -- shared memory control
|
Performs the action specified by cmd on the shared memory segment identified by shmid: IPC_STAT Fetch the segment's struct shmid_ds, storing it in the memory pointed to by buf. IPC_SET Changes the sh... |
shmdt(2) -- attach or detach shared memory
|
The shmat() system call attaches the shared memory segment identified by shmid to the calling process's address space. The address where the segment is attached is determined as follows: +o If addr i... |
shmget(2) -- obtain a shared memory identifier
|
Based on the values of key and flag, shmget() returns the identifier of a newly created or previously existing shared memory segment. The key is analogous to a filename: it provides a handle that name... |
shutdown(2) -- shut down part of a full-duplex connection
|
The shutdown() system call causes all or part of a full-duplex connection on the socket associated with the file descriptor s to be shut down. The how argument specifies the type of shutdown. Possible... |
sigaction(2) -- software signal facilities
|
The system defines a set of signals that may be delivered to a process. Signal delivery resembles the occurrence of a hardware interrupt: the signal is normally blocked from further occurrence, the cu... |
sigaltstack(2) -- set and/or get signal stack context
|
The sigaltstack() system call allows users to define an alternate stack on which signals are to be processed. If ss is non-zero, it specifies a pointer to and the size of a signal stack on which to de... |
sigblock(2) -- manipulate current signal mask
|
This interface is made obsolete by: sigprocmask(2). The sigsetmask() function sets the current signal mask to the specified mask. Signals are blocked from delivery if the corresponding bit in mask is ... |
sigmask(2) -- manipulate current signal mask
|
This interface is made obsolete by: sigprocmask(2). The sigsetmask() function sets the current signal mask to the specified mask. Signals are blocked from delivery if the corresponding bit in mask is ... |
sigpause(2) -- atomically release blocked signals and wait for interrupt
|
This interface is made obsolete by sigsuspend(2). The sigpause() function assigns sigmask to the set of masked signals and then waits for a signal to arrive; on return the set of masked signals is res... |
sigpending(2) -- get pending signals
|
The sigpending() system call returns a mask of the signals pending for delivery to the calling process in the location indicated by set. Signals may be pending because they are currently masked, or tr... |
sigprocmask(2) -- manipulate current signal mask
|
The sigprocmask() system call examines and/or changes the current signal mask (those signals that are blocked from delivery). Signals are blocked if they are members of the current signal mask set. If... |
sigreturn(2) -- return from signal
|
The sigreturn() system call allows users to atomically unmask, switch stacks, and return from a signal context. The processes signal mask and stack status are restored from the context structure point... |
sigsetmask(2) -- manipulate current signal mask
|
This interface is made obsolete by: sigprocmask(2). The sigsetmask() function sets the current signal mask to the specified mask. Signals are blocked from delivery if the corresponding bit in mask is ... |
sigstack(2) -- set and/or get signal stack context
|
The sigstack() function has been deprecated in favor of the interface described in sigaltstack(2). |
sigsuspend(2) -- atomically release blocked signals and wait for interrupt
|
The sigsuspend() system call temporarily changes the blocked signal mask to the set to which sigmask points, and then waits for a signal to arrive; on return the previous set of masked signals is rest... |
sigvec(2) -- software signal facilities
|
This interface is made obsolete by sigaction(2). The system defines a set of signals that may be delivered to a process. Signal delivery resembles the occurrence of a hardware interrupt: the signal is... |
socket(2) -- create an endpoint for communication
|
The socket() system call creates an endpoint for communication and returns a descriptor. The domain argument specifies a communications domain within which communication will take place; this selects ... |
socketpair(2) -- create a pair of connected sockets
|
The socketpair() system call creates an unnamed pair of connected sockets in the specified domain d, of the specified type, and using the optionally specified protocol. The descriptors used in referen... |
stat(2) -- get file status
|
The stat() system call obtains information about the file pointed to by path. Read, write or execute permission of the named file is not required, but all directories listed in the path name leading t... |
statfs(2) -- get file system statistics
|
The statfs() system call returns information about a mounted file system. The path argument is the path name of any file within the mounted file system. The buf argument is a pointer to a statfs struc... |
swapoff(2) -- control devices for interleaved paging/swapping
|
The swapon() system call makes the block device special available to the system for allocation for paging and swapping. The names of potentially available devices are known to the system and defined a... |
swapon(2) -- control devices for interleaved paging/swapping
|
The swapon() system call makes the block device special available to the system for allocation for paging and swapping. The names of potentially available devices are known to the system and defined a... |
symlink(2) -- make symbolic link to a file
|
A symbolic link name2 is created to name1 (name2 is the name of the file created, name1 is the string used in creating the symbolic link). Either name may be an arbitrary path name; the files need not... |
sync(2) -- schedule file system updates
|
The sync() system call forces a write of dirty (modified) buffers in the block buffer cache out to disk. The kernel keeps this information in core to reduce the number of disk I/O transfers required b... |
sysarch(2) -- architecture-dependent system call
|
The sysarch() system call performs the architecture-dependent function specified by number with the arguments specified by the args pointer. The args argument is a pointer to a structure defining the ... |
syscall(2) -- indirect system call
|
The syscall() function performs the system call whose assembly language interface has the specified number with the specified arguments. Symbolic constants for system calls can be found in the header ... |
truncate(2) -- truncate or extend a file to a specified length
|
The truncate() system call causes the file named by path or referenced by fd to be truncated or extended to length bytes in size. If the file was larger than this size, the extra data is lost. If the ... |
umask(2) -- set file creation mode mask
|
The umask() routine sets the process's file mode creation mask to numask and returns the previous value of the mask. The 9 low-order access permission bits of numask are used by system calls, includi... |
undelete(2) -- attempt to recover a deleted file
|
The undelete() system call attempts to recover the deleted file named by path. Currently, this works only when the named object is a whiteout in a union file system. The system call removes the whiteo... |
unlink(2) -- remove directory entry
|
The unlink() system call removes the link named by path from its directory and decrements the link count of the file which was referenced by the link. If that decrement reduces the link count of the f... |
unmount(2) -- mount or dismount a file system
|
The mount() system call grafts a file system object onto the system file tree at the point dir. The argument data describes the file system object to be mounted. The argument type tells the kernel how... |
utimes(2) -- set file access and modification times
|
The access and modification times of the file named by path or referenced by fd are changed as specified by the argument times. If times is NULL, the access and modification times are set to the curre... |
utrace(2) -- insert user record in ktrace log
|
Adds a record to the process trace with information supplied by user. The record contains len bytes from memory pointed to by addr. This call only has an effect if the calling process is being traced. |
uuidgen(2) -- generate universally unique identifiers
|
The uuidgen() system call generates count universally unique identifiers (UUIDs) and writes them to the buffer pointed to by store. The identifiers are generated according to the syntax and semantics ... |
vfork(2) -- spawn new process in a virtual memory efficient way
|
The vfork() system call can be used to create new processes without fully copying the address space of the old process, which is horrendously inefficient in a paged environment. It is useful when the ... |
wait(2) -- wait for process termination
|
The wait() function suspends execution of its calling process until status information is available for a terminated child process, or a signal is received. On return from a successful wait() call, th... |
wait3(2) -- wait for process termination
|
The wait() function suspends execution of its calling process until status information is available for a terminated child process, or a signal is received. On return from a successful wait() call, th... |
wait4(2) -- wait for process termination
|
The wait() function suspends execution of its calling process until status information is available for a terminated child process, or a signal is received. On return from a successful wait() call, th... |
waitpid(2) -- wait for process termination
|
The wait() function suspends execution of its calling process until status information is available for a terminated child process, or a signal is received. On return from a successful wait() call, th... |
write(2) -- write output
|
The write() system call attempts to write nbytes of data to the object referenced by the descriptor d from the buffer pointed to by buf. The writev() system call performs the same action, but gathers ... |
writev(2) -- write output
|
The write() system call attempts to write nbytes of data to the object referenced by the descriptor d from the buffer pointed to by buf. The writev() system call performs the same action, but gathers ... |
_exit(2) -- terminate the calling process
|
The _exit() system call terminates a process with the following consequences: +o All of the descriptors open in the calling process are closed. This may entail delays, for example, waiting for output ... |
__syscall(2) -- indirect system call
|
The syscall() function performs the system call whose assembly language interface has the specified number with the specified arguments. Symbolic constants for system calls can be found in the header ... |