Syscalls are special requests made to the operating system by a user or programmer. The point of these is to bridge the privilege gap between user and kernel mode in a controlled way.

UNIX-based systems

On UNIX-based systems (including Linux), there are ~453 total syscalls. We can trace all system calls that a process makes on Linux with the command strace <PROGRAM>.

See Linux syscalls for a non-exhaustive list.

If a syscall fails, we should save errno to a local variable if we later use other functions that may set it.