{
    "mode": "man",
    "parameter": "intro",
    "section": "2",
    "url": "https://www.chedong.com/phpMan.php/man/intro/2/json",
    "generated": "2026-06-12T01:08:02Z",
    "sections": {
        "NAME": {
            "content": "intro - introduction to system calls\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Section  2  of  the manual describes the Linux system calls.  A system call is an entry point\ninto the Linux kernel.  Usually, system calls are not invoked directly: instead, most  system\ncalls  have corresponding C library wrapper functions which perform the steps required (e.g.,\ntrapping to kernel mode) in order to invoke the system call.   Thus,  making  a  system  call\nlooks the same as invoking a normal library function.\n\nIn many cases, the C library wrapper function does nothing more than:\n\n*  copying  arguments and the unique system call number to the registers where the kernel ex‐\npects them;\n\n*  trapping to kernel mode, at which point the kernel does the real work of the system call;\n\n*  setting errno if the system call returns an error number when the kernel returns  the  CPU\nto user mode.\n\nHowever,  in  a few cases, a wrapper function may do rather more than this, for example, per‐\nforming some preprocessing of the arguments before trapping to kernel mode, or postprocessing\nof values returned by the system call.  Where this is the case, the manual pages in Section 2\ngenerally try to note the details of both the (usually GNU) C library API interface  and  the\nraw  system call.  Most commonly, the main DESCRIPTION will focus on the C library interface,\nand differences for the system call are covered in the NOTES section.\n\nFor a list of the Linux system calls, see syscalls(2).\n",
            "subsections": []
        },
        "RETURN VALUE": {
            "content": "On error, most system calls return a negative error number (i.e., the negated value of one of\nthe  constants  described  in  errno(3)).   The  C library wrapper hides this detail from the\ncaller: when a system call returns a negative value, the wrapper copies  the  absolute  value\ninto the errno variable, and returns -1 as the return value of the wrapper.\n\nThe value returned by a successful system call depends on the call.  Many system calls return\n0 on success, but some can return nonzero values from a successful call.  The details are de‐\nscribed in the individual manual pages.\n\nIn  some cases, the programmer must define a feature test macro in order to obtain the decla‐\nration of a system call from the header file specified in  the  man  page  SYNOPSIS  section.\n(Where  required,  these  feature  test  macros  must  be defined before including any header\nfiles.)  In such cases, the required macro is described in the man page.  For further  infor‐\nmation on feature test macros, see featuretestmacros(7).\n",
            "subsections": []
        },
        "CONFORMING TO": {
            "content": "Certain  terms  and  abbreviations  are used to indicate UNIX variants and standards to which\ncalls in this section conform.  See standards(7).\n",
            "subsections": []
        },
        "NOTES": {
            "content": "",
            "subsections": [
                {
                    "name": "Calling directly",
                    "content": "In most cases, it is unnecessary to invoke a system call directly, but there are  times  when\nthe Standard C library does not implement a nice wrapper function for you.  In this case, the\nprogrammer must manually invoke the system call using  syscall(2).   Historically,  this  was\nalso possible using one of the syscall macros described in syscall(2).\n"
                },
                {
                    "name": "Authors and copyright conditions",
                    "content": "Look  at  the  header  of  the manual page source for the author(s) and copyright conditions.\nNote that these can be different from page to page!\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "syscall(2), syscall(2), syscalls(2), errno(3), intro(3), capabilities(7), credentials(7),\nfeaturetestmacros(7), mqoverview(7), pathresolution(7), pipe(7), pty(7), semoverview(7),\nshmoverview(7), signal(7), socket(7), standards(7), systemdatatypes(7), symlink(7),\nsysvipc(7), time(7)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This page is part of release 5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-11-01                                     INTRO(2)",
            "subsections": []
        }
    },
    "summary": "intro - introduction to system calls",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "syscall",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/syscall/2/json"
        },
        {
            "name": "syscall",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/syscall/2/json"
        },
        {
            "name": "syscalls",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/syscalls/2/json"
        },
        {
            "name": "errno",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/errno/3/json"
        },
        {
            "name": "capabilities",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/capabilities/7/json"
        },
        {
            "name": "credentials",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/credentials/7/json"
        },
        {
            "name": "featuretestmacros",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/featuretestmacros/7/json"
        },
        {
            "name": "mqoverview",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/mqoverview/7/json"
        },
        {
            "name": "pathresolution",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pathresolution/7/json"
        },
        {
            "name": "pipe",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pipe/7/json"
        },
        {
            "name": "pty",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pty/7/json"
        },
        {
            "name": "semoverview",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/semoverview/7/json"
        },
        {
            "name": "shmoverview",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/shmoverview/7/json"
        },
        {
            "name": "signal",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/signal/7/json"
        },
        {
            "name": "socket",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/socket/7/json"
        },
        {
            "name": "standards",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/standards/7/json"
        },
        {
            "name": "systemdatatypes",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemdatatypes/7/json"
        },
        {
            "name": "symlink",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/symlink/7/json"
        },
        {
            "name": "sysvipc",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/sysvipc/7/json"
        },
        {
            "name": "time",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/time/7/json"
        }
    ]
}