Plays from YouTube. Watch on YouTube
When open returns a small integer, what resource does that number identify?
Meet System Calls and File Descriptors: an original animated lesson in C and Unix systems programming.
We start at the user/kernel boundary and distinguish descriptor entries from underlying open-file descriptions.
Then we trace open, read, write, close, short transfers, blocking calls, EINTR, EAGAIN and errno handling.
The big idea: A successful system call reports what actually happened, not necessarily everything requested.
C and Unix explained visually, one concept at a time.