System Calls
System calls are invoked ...
- directly, through a library of system calls
- documented in Unix Programmers Manual section 2
(e.g. man 2 open )
- indirectly, through functions in the C libraries
- documented in Unix Programmers Manual section 3
(e.g. man 3 fopen )
Example of system call library vs C library
- file descriptors,
open() , close() , read() , write() (via #include <unistd.h> )
- file pointers (
FILE* ), fopen() , fclose() , fgets() , scanf() ,printf() (via #include <stdio.h> )
|