in reply to race condition? - flock and $SIG{ALRM}

Letīs analyze what happens, if you get an flock and die before you can unset the alarm.

So far, youīre codeīs fine. As for the reliabilty of signals ... there is some coverage in the perldocs and here in the monastry. I donīt have a link handy, youīll have to try a search.

Have fun ...

Andreas
five days ītil YAPC::Europe ...

Update: BTW, using a nonblocking flock and putting the process to sleep for a random time would eliminate the need for signals. Try something like three tries with varying random sleeping times, if unsuccessful, give up (i.e. die). Adjust number of tries and sleeping time for your needs.

  • Comment on (atl: flocks and processes) RE: race condition? - flock and $SIG{ALRM}