in reply to More Eyes, Please
When flock() hangs and you haven't specified LOCK_NB, then it is very, very likely that another process holds a lock on that file and you are waiting for that lock to clear.
Since the file is named "/tmp/$$.tmp", I can't think what other process would be likely to hold a lock on it. Try the following:
use Fcntl qw( :flock ); #[...] open(TMPA, "+> $tempfile") or die "Could not open tempfile: $!"; flock(TMPA, LOCK_EX|LOCK_NB) or die "ERROR: $!";
FYI, saying "it dies here" makes it sound like the "or die" is triggered and you see the value of $!.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Kozz) Re: More Eyes
by Kozz (Friar) on Aug 22, 2000 at 08:52 UTC | |
by Jonathan (Curate) on Aug 22, 2000 at 13:56 UTC |