I know that if I call the function openbefore fork(), the IO pointer is shared between processes.
open
fork()
If one of these processes closes the file calling the function close(fd), will the other processes still be able to write / read the file or will the file be closed to everyone?
close(fd)
Yes. Each process has a copy of the file descriptor (among other things). Thus, one process closing it will not affect the copy fdin another process.
fd
From the fork()manual:
. (. open (2)) . , , , (. F_SETOWN F_SETSIG fcntl (2)).
close() :
close()
fd , (. open (2)), , ; , unlink (2), .
, close(fd);, , , , .
close(fd);
, , . , , , . , , , , , . , .