Section 2 of the manual describes the Linux system calls. A system
call is an entry point into the Linux kernel. Usually, system calls
are not invoked directly: instead, most system calls have corresponding
C library wrapper functions which perform the steps required (e.g.,
trapping to kernel mode) in order to invoke the system call. Thus,
making a system call looks the same as invoking a normal library func-
For a list of the Linux system calls, see syscalls(2).
On error, most system calls return a negative error number (i.e., the
negated value of one of the constants described in errno(3)). The C
library wrapper hides this detail from the caller: when a system call
returns a negative value, the wrapper copies the absolute value into
the errno variable, and returns -1 as the return value of the wrapper.
The value returned by a successful system call depends on the call.
Many system calls return 0 on success, but some can return nonzero val-
ues from a successful call. The details are described in the individ-
ual manual pages.
In some cases, the programmer must define a feature test macro in order
to obtain the declaration of a system call from the header file speci-
fied in the man page SYNOPSIS section. (Where required, these feature
test macros must be defined before including any header files.) In
such cases, the required macro is described in the man page. For fur-
ther information on feature test macros, see feature_test_macros(7).
Certain terms and abbreviations are used to indicate UNIX variants and
standards to which calls in this section conform. See standards(7).
In most cases, it is unnecessary to invoke a system call directly, but
there are times when the Standard C library does not implement a nice
wrapper function for you. In this case, the programmer must manually
invoke the system call using syscall(2). Historically, this was also
possible using one of the _syscall macros described in _syscall(2).
Authors and Copyright Conditions
Look at the header of the manual page source for the author(s) and
copyright conditions. Note that these can be different from page to
_syscall(2), syscall(2), syscalls(2), errno(3), intro(3),
capabilities(7), credentials(7), feature_test_macros(7),
mq_overview(7), path_resolution(7), pipe(7), pty(7), sem_overview(7),
shm_overview(7), signal(7), svipc(7), standards(7), socket(7),
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2017
All Rights Reserved.