so I am reading some kernel code and notice this: http://lxr.free-electrons.com/source/include/linux/fs.h?v=2.6.32#L63
in line 69, we have:
/* file can be accessed using pread */
#define FMODE_PREAD ((__force fmode_t)8)
I am wondering when would a fd be not accessible by pread? I thought we can do pread on any fd...
Thanks!
Erben
man pread
on my Linux system says:So if a file descriptor is not seekable (e.g. a socket or stdin), you will not be able to
pread
it.