9/16 I have a perl script that forks off children who do some
IO-bound work and then print a result to stdout. Each child
locks the STDOUT filehandle like this
flock(STDOUT, LOCK_EX);
&dump_results();
flock(STDOUT, LOCK_UN);
but I still get child A's output mixed in with child B's. What am
I doing wrong?
\_ I recall something in the perl book (I have 1st ed) about switching
between filehandles for output. They give some example code. Sorry
I can't be more helpful.
\_ thanks, I put in some "|| die" messages and I got
"Operation not permitted." I switched to using an actual
file and that seems to work. |