Multiple file descriptors to the same file, C

Posted by Gigi on Stack Overflow See other posts from Stack Overflow or by Gigi
Published on 2010-04-18T21:03:04Z Indexed on 2010/04/18 21:13 UTC
Read the original article Hit count: 379

I have a multithreaded application that is opening and reading the same file (not writing). I am opening a different file descriptor for each thread (but they all point to the same file). Each thread then reads the file and may close it and open it again if EOF is reached. Is this ok? If I perform fclose() on a file descriptor does it affect the other file descritptors that point to the same file?

© Stack Overflow or respective owner

Related posts about fclose

Related posts about multiple