描述
本手册的第二部分描述了Linux的系统调用。系统调用是一个入口点到Linux内核中。通常情况下,系统调用不直接调用:相反,大多数系统调用都有相应的C库函数的包装而执行所需的步骤(例如,捕获到内核模式),以便调用系统调用。因此,做一个系统调用看起来一样调用一个正常的库函数。对于Linux系统调用列表,请参阅 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.一个成功的系统调用返回的值取决于调用。许多系统调用返回0表示成功,但有些可以从一个成功的调用返回非零值。详情载于个别的手册页描述。
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 specified in the man page SYNOPSIS section. In such cases, the required macro is described in the man page. For further information on feature test macros, see feature_test_macros(7).
遵循于
某些术语和缩写用于指示的Unix变体和标准在本节所谓符合。看 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).作者和版权条款
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 page!另请参阅
This page is part of release 3.00 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.