1INTRO(2)                   Linux Programmer's Manual                  INTRO(2)
2
3
4

NAME

6       intro - Introduction to system calls
7

DESCRIPTION

9       Section  2  of  the  manual describes the Linux system calls.  A system
10       call is an entry point into the Linux kernel.   Usually,  system  calls
11       are not invoked directly: instead, most system calls have corresponding
12       C library wrapper functions which perform  the  steps  required  (e.g.,
13       trapping  to  kernel  mode)  in order to invoke the system call.  Thus,
14       making a system call looks the same as invoking a normal library  func‐
15       tion.
16
17       For a list of the Linux system calls, see syscalls(2).
18

RETURN VALUE

20       On  error,  most system calls return a negative error number (i.e., the
21       negated value of one of the constants described in  errno(3)).   The  C
22       library  wrapper  hides this detail from the caller: when a system call
23       returns a negative value, the wrapper copies the  absolute  value  into
24       the errno variable, and returns -1 as the return value of the wrapper.
25
26       The  value  returned  by  a successful system call depends on the call.
27       Many system calls return 0 on success, but  some  can  return  non-zero
28       values  from a successful call.  The details are described in the indi‐
29       vidual manual pages.
30
31       In some cases, the programmer must define a feature test macro in order
32       to  obtain the declaration of a system call from the header file speci‐
33       fied in the man page SYNOPSIS section.  In  such  cases,  the  required
34       macro is described in the man page.  For further information on feature
35       test macros, see feature_test_macros(7).
36

CONFORMING TO

38       Certain terms and abbreviations are used to indicate Unix variants  and
39       standards to which calls in this section conform.  See standards(7).
40

NOTES

42   Calling Directly
43       In  most cases, it is unnecessary to invoke a system call directly, but
44       there are times when the Standard C library does not implement  a  nice
45       wrapper  function  for you.  In this case, the programmer must manually
46       invoke the system call using syscall(2).  Historically, this  was  also
47       possible using one of the _syscall macros described in _syscall(2).
48
49   Authors and Copyright Terms
50       Look  at  the  header  of  the manual page source for the author(s) and
51       copyright conditions.  Note that these can be different  from  page  to
52       page!
53

SEE ALSO

55       _syscall(2), syscall(2), errno(3), feature_test_macros(7), standards(7)
56

COLOPHON

58       This  page  is  part of release 3.22 of the Linux man-pages project.  A
59       description of the project, and information about reporting  bugs,  can
60       be found at http://www.kernel.org/doc/man-pages/.
61
62
63
64Linux                             2007-10-23                          INTRO(2)
Impressum