PID lockfile
Aahz
aahz at pythoncraft.com
Sat Mar 28 19:13:05 EDT 2009
In article <87iqlwvemo.fsf at benfinney.id.au>,
Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
>
>In the case of the âlockfileâ library, Skip is aiming for a
>cross-platform solution, with atomic behaviour; he has implemented
>lock acquisition with a âlinkâ operation on Unix, and a âmkdirâ
>operation on Windows.
>
>But both of those, of course, create a new file. What I want is to
>lock an existing file. Is âlockfâ particularly prone to cross-platform
>troubles on Unix variants? (Since the âbecome a daemonâ pattern
>makes no sense on anything but Unix, I'm only concerned with PID file
>behaviour that works on Unix.)
IIUC, you must use something like Skip's trick to work correctly with
NFS.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"
--Michael Foord paraphrases Christian Muirhead on python-dev, 2009-3-22
More information about the Python-list
mailing list