Hello,
Anyone has any links that explain how file pointers with parent and child (fork) work?
I know that if you fork then, the child gets a clone of the parent (code, variables and pointers!) so if you fork after you opened the file, then both parent and child share the pointer?
However, even if you fork and then assign the file pointer, still both pointers point to the same file? Is there an "internal" pointer in this case were keeps track on which line the process is reading from?
Thanks.
Anyone has any links that explain how file pointers with parent and child (fork) work?
I know that if you fork then, the child gets a clone of the parent (code, variables and pointers!) so if you fork after you opened the file, then both parent and child share the pointer?
However, even if you fork and then assign the file pointer, still both pointers point to the same file? Is there an "internal" pointer in this case were keeps track on which line the process is reading from?
Thanks.