low-end persistence strategies?
Nick Craig-Wood
nick at craig-wood.com
Fri Feb 18 05:30:01 EST 2005
Michele Simionato <michele.simionato at gmail.com> wrote:
> Ok, I have yet another question: what is the difference
> between fcntl.lockf and fcntl.flock? The man page of
> my Linux system says that flock is implemented independently
> of fcntl, however it does not say if I should use it in preference
> over fcntl or not.
flock() and lockf() are two different library calls.
With lockf() you can lock parts of a file. I've always used flock().
>From man lockf() "On Linux, this call [lockf] is just an interface for
fcntl(2). (In general, the relation between lockf and fcntl is
unspecified.)"
see man lockf and man flock
--
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list
mailing list