News for hackers. Stuff that matters.
Re:Fork is not my favourite syscall by tialaramex on Friday January 05, 2018 @12:33PM (#16080035)
Yeah, no.

You are correct that the manual section 2 is "for" system calls, but in practice today these are just the lowest level of the C library, and not the actual system calls.

My copy of the clone(2) manual page hints at this by commenting /* For the prototype of the raw system call, see NOTES */

and more explicitly in its body text by saying "The main text describes the wrapper function; the differences for the raw system call are described toward the end of this page."

Other modern stuff is the same way, the section 2 documentation is describing what an ordinary C programmer needs to know, but if you're say, implementing the C standard library or writing a compiler for a language that runs on the bare metal you need to read the kernel documentation which is not provided as manual pages.

There are no comments on this comment yet.