multiple instance on Unix

Cameron Laird claird at lairds.us
Thu Sep 30 01:08:03 EDT 2004


In article <x7d604xxv3.fsf at guru.mired.org>, Mike Meyer  <mwm at mired.org> wrote:
			.
			.
			.
>The (old) standard method for locking on Unix is to use a file. Open
>it in exclusive mode. Using os.open(<filename>, O_EXCL | O_RDONLY) (or
>O_WRONLY, or O_RDWR) should do the trick.
			.
			.
			.
*My* favorite is to open a server socket; its semantics are
exactly those one wants, without having to tend to filesystem
hygiene with its attendant race and security challenges.



More information about the Python-list mailing list