Re: problems with new patch?


Subject: Re: problems with new patch?
From: wesley.craig@umich.edu
Date: Mon May 06 1996 - 14:24:28 EDT


> From: "Rob Newberry" <rob@eats.com>
> To: "netatalk-admins@umich.edu" <netatalk-admins@umich.edu>

> Has anybody else seen this behavior?

Me, me! I have!

This is a "bug" in the flock() compatibility library for linux. The
proper semantic is that even within a given process flock() will fail
if a file is already locked. Under linux (and solaris, which is how I
found this problem), flock() calls lockf(), which says that the
currently locking process always gets the lock, even if that process
has the file locked already. lockf() is process file locking, while
flock() is file-descriptor file locking. I haven't thought of a really
cool fix, but I think it will involve having flock() check to see if
the current process already has the file locked.

Sorry I can't be of more immediate help...

:wes



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:24:05 EST