[Jax.PM] child proc output

Nate Campi nate at campin.net
Tue Oct 8 15:07:08 CDT 2002


I have a script that reads log lines from STDIN and keeps stats in
memory. At a user-defined interval I fork a child to read a one line
text file with some numbers in it (exclusive lock) add the current
numbers to it and write out the updated totals.

Sometimes my file gets messed up despite the lock, and I want to see
what's going on. I have a bunch of print statements but I don't see
them. The fork executes a subroutine and exits, it's not a fork and
exec. How do I see the output from the kid when I run the parent script
manually?
-- 
"Golf is a good walk spoiled." - Samuel Clemens




More information about the Jacksonville-pm mailing list