Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I ran another copy of the program to test the file locking and it blocked as expected.flock(FP, LOCK_EX) or die "Cannot lock $FILE ($!)\n".
Then I went and Control-C's (killed) the first program (stuck in the sleep(200)). The second copy of the program finished.
Now, whenever I run the program again, the lock fails with the message:
How do I kill this lock/stop this error message?Cannot lock filename (Bad file number)
This is perl, v5.6.1 built for sun4-solaris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I kill a stuck lock on a file?
by Abigail-II (Bishop) on Oct 31, 2002 at 11:21 UTC | |
by Anonymous Monk on Nov 04, 2002 at 04:19 UTC | |
|
Re: How do I kill a stuck lock on a file?
by ehdonhon (Curate) on Oct 31, 2002 at 00:07 UTC | |
by Anonymous Monk on Nov 04, 2002 at 04:17 UTC |