[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LC++]IOStreams and forking.



Hi,

I have a program that opens a file (used as a log) then forks to create N number of children.

My question is, in C++ when I call fork(), is the file supposed to stay open or not?

I know that in C all open file descriptors are copied to the new process, but does the same apply to iostreams?

At the moment, I seems to lose any IO to the file after the 1st fork.

Thanks,

--
David Filion
Registerd (Slackware) linux user #195143