For various reasons we don't want the user to be able to run multiple
instances of Chandler against the same repository. For example, if you
fire up two instances at the same time, one of them will complain that
//Schema already exists, and there are other places where things don't
quite work. So I was wondering if anyone had an idea for a
cross-platform way to prevent multiple concurrent instances accessing a
repository. Chandler could look for and create a lock file next to the
repository directory, and place its process ID in there, thereby
allowing it to detect whether an existing lock file is obsolete because
a previous instance died without removing it. (Does Windows have the
notion of PID?) This method leaves the repository itself out of it --
purely an application level function. Or we could get the repository
involved and have it keep track of which process has it open, and the
application layer asks the repository. I guess I would lean toward the
former method.
I'm sure there must be some python module that does this already, in a
cross-platform way...
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev