|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: flock() broken under FreeBSD?by dws (Chancellor) |
| on Jul 27, 2002 at 00:48 UTC ( #185704=note: print w/ replies, xml ) | Need Help?? |
|
The important part is:Are you assuming that you can hold the lock while up- or down-grading it? I did, but the FreeBSD flock(2) man page provides this enlightenment:which shows process 64310 getting a shared lock (and holding it) and then the other process (64308) successfully getting an exclusive lock. A shared lock may be upgraded to an exclusive lock, and vice versa, simply by specifying the appropriate lock type; this results in the previous lock being released and the new lock applied (possibly after other processes have gained and released the lock).I'm guessing that when 64310 hits the (blocking) flock( \*DATA, LOCK_EX ); the previous shared lock that 64310 held is released, and 64308 sneaks in to own the lock, leaving 64310 blocked. Then 64310 seems to go away, though I can't tell if that's permanent, or a side-effect of your killing off the scripts.
In Section
Meditations
|
|
||||||||||||||||||||||||||||||