File descriptors before fork()

I know that if I call the open function before the fork() the IO pointer is shared between the processes.

My question is: if one of these processes closes the file calling the close(fd) function, will the other processes be still capable of write/read the file or the file will be closed for everyone? Thanks


Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.