Why does fseek use read() system call?
问题 I'm trying to understand the glibc implementation of fseek . To do so, I downloaded the glibc source code and tried to understand its function execution order. I found the fseek implementation in libio/fseek.c . Basically, it calls the function (or rather the macro) _IO_fseek() using the same parameters. This macro is implemented in libio/iolibio.h . It is defined as _IO_seekoff_unlocked (__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) (implemented in libio/ioseekoff.c ). The next step in