Run shared-threaded or under mod_perl, instance 1 gets the lock. Instance 2 opens the global handle *SEM. Instance 1's handle is closed and its lock gone, but since it knows the global handle only by name, it never learns of it.
Update: The two don't know about each other, are sharing a filehandle, and are executing the same code at maybe the same time. Globals are extra evil in such an environment.
After Compline,
Zaxo
In reply to Re: flock LOCK_EX
by Zaxo
in thread flock LOCK_EX
by Gorby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |