Do different threads within a single process have distinct independent file descriptor tables? If multiple threads within the same process concurrently access a single file, will the offset into the file for two different calls to open performed by different threads be thread-specific?
Do different threads within a single process have distinct independent file descriptor tables? If
Share
The file descriptors are shared between the threads. If you want “thread specific” offsets, why not have each thread use a different file descriptor (
open(2)multiple times) ?