http://qs321.pair.com?node_id=58644


in reply to flock, not unflocking

First, something that has been implied but not stated outright: What O/S are you using. Some do not do flock properly. Second, since your example says its doing the lock first and then attempts the lock, but never prints the 'done' message (you said it locks up after printing the message) I would say that something else may be wrong with how you are attempting the flock, OR something else has the file locked and your program is waiting to acquire the lock.