3 ms·
It so happens, that Linux kernel has a system call named fork. But nothing states that this system call has to conform to the POSIX specification of fork(). If
by rapala 16y ago
It so happens, that Linux kernel has a system call named fork. But nothing states that this system call has to conform to the POSIX specification of fork(). If it does so, it does so for convenience.
What makes Linux as an operating system conform to POSIX is the API, implemented in C. In this API, the function fork() has to do what the POSIX specification states. As stated, this fork() does not even use the system call fork in the resent versions of glibc.
As POSIX is a superset of the C standard library, it does provide a replacement. The C standard library exists to provide the very basic functionality in it, in environments and operating systems that are not POSIX compliant.
C standard library is part of the C implementation. The POSIX API, implemented in what ever language, is part of the operating system.