Threads and file descriptors

后端 未结 4 1382
萌比男神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:05

    No, there is only one file descriptor table per process, and it's shared among all the threads.

    From your problem description, you might want to look into the pread() and pwrite() functions.

提交回复
热议问题