system wide mutex

Skip Montanaro skip at pobox.com
Sun Feb 9 10:40:00 EST 2014


On Sun, Feb 9, 2014 at 8:45 AM, Roy Smith <roy at panix.com> wrote:
> This is true of all mutexes, no?

Hmmm... You might well be right. I thought that use of the O_EXLOCK
flag in the open(2) system call would prevent other processes from
opening the file, but (at least on my Mac) it just blocks until the
first process closes the file. Perhaps there are some other flags you
can use to cause the second open(2) call to error out.

Skip



More information about the Python-list mailing list