(-H) wrote:
# Hi,
#
# I have a "parent" C program that forks off a "child" C program.
# Both the parent and the child print information to both stdout and
# stderr.
#
# I would like to redirect the parent and childs output to both stdout
# and an output logfile (in effect, a "tee" like behavior).
#
# I've tried several things with pipes and freopens, but I always seem
# to get data out of synch.
Each process has its own buffers. To force output to a device, you need to use
fflush or turn off bufferring with setvbuf. This can slow the program down.
--
Derk Gwen
http://derkgwen.250free.com/html/index.html
I have no idea what you just said.
I get that alot.