My apologies, but the lock in my code is actually LOCK_EX (I copied the code directly from the book instead of from my program).Don't do that. Copy and paste your actual code. Your problem may be some really subtle thing in your code, not the book.
Unfortunately I've never witnessed the last run of the program before it stops, so I've no idea how it dies. I'm just assuming that it's the lockfile because as soon as I delete it all other programs run freely again.Huh? What do you mean "the last run of the program before it stops"? If it doesn't stop, why do you think it closes the file? Or do you mean that there are several processes all running the same code? When you say "all other programs", do you mean all other processes running the same code, or processes running different code? If it is different code, you need to post that, too.
In reply to Re: Re: Re: pesky lockfile stays locked
by Thelonius
in thread pesky lockfile stays locked
by traxlog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |