in reply to flock LOCK_EX
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: flock LOCK_EX
by Gorby (Monk) on Jan 13, 2004 at 08:13 UTC |