in reply to open FH, "|foo" under modperl2
You've got a nasty little race condition in your log handling. Someone can squeeze in and modify the log file between the time you've opened the file for append and the time you've thrown a lock on the file. The simple cure for this is to toss in a seek $fh, 0, 2; after the call to flock().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: open FH, "|foo" under modperl2
by bart (Canon) on Feb 06, 2004 at 23:21 UTC |