Threads and file descriptors

后端 未结 4 1380
萌比男神i
萌比男神i 2020-12-30 03:36

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,

4条回答
  •  庸人自扰
    2020-12-30 04:16

    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) ?

提交回复
热议问题