dot-locking
You could leave the flock locking on and surround it with dot-locking.
To perform dot-locking, create the file <mailbox-name>.lock using
open(name, O_CREAT|O_EXCL, 0644). Create with O_EXCL will fail if the
file exists. If you can't create it, sleep for a while and try again.
To unlock, unlink() the file.
Thanks
Bruce
--
Bruce Perens K6BP Bruce@Pixar.com 510-215-3502
Finger bruce@master.Debian.org for PGP public key.
PGP fingerprint = 88 6A 15 D0 65 D4 A3 A6 1F 89 6A 76 95 24 87 B3
Reply to: