Per Jessen schreef:
Jochem Maas wrote:

lockfile=/var/lock/<xxxx>/file
# clear out a lock older than 60mins
find $lockfile -cmin +60 | xargs rm
test ! -f $lockfile && (
touch $lockfile
<run some php>
rm -f $lockfile
)
wouldn't creating a dir be better here? (with regard to atomicity)


I haven't thought it through, but I don't think it would change
anything.

directory creation is garanteed to be atomic, even across NFS, or
so Rob said. additionally his idea of being able to dump lock-process
related data in said directory is quite nifty.



/Per Jessen, Zürich




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to