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,
In Linux, you can unshare() the file descriptor table via the CLONE_FILES flag, but I would advise against it.
unshare()
CLONE_FILES