[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: Linux file locking problems - a new variation on the old  problem
From:       Nigel Metheringham <Nigel.Metheringham () ThePLAnet ! net>
Date:       1996-05-20 13:16:03
[Download RAW message or body]

The *right* thing to do is to use fnctl - flock just doesn't cut it 
as is inferred in the document that John quoted:-

jhenders@bogon.com said:
} This seemed to be the only way to avoid all possible deadlock 
} conditions, as flock() locks do not strictly have one owner process 
} and so can't be checked for deadlocking in the usual manner.

} The process that created a lock with flock() might have forked 
} multiple children and exited. Previously the parent process would 
} have been marked as the owner of the lock, but deadlocks could just 
} have easily occurred in one or more of the children, which we would 
} not have been able to identify and avoid. 

The fact that the dbm stuff then locks under your feet means that 
someone else has broken things even more effectiively.

I would suggest that john's patch is made highly conditional if it is 
included at all - ie you need to ask for it.  Personally I only have 
Berkeley db on my system (no gdbm) and several other people will be 
in the same position, and that has no need to fudge locking.

	Nigel.

-- 
[ Nigel.Metheringham@theplanet.net   - Unix Applications Engineer ]
[ *Views expressed here are personal and not supported by PLAnet* ]
[ PLAnet Online : The White House     Tel : +44 113 2345566 x 612 ]
[ Melbourne Street, Leeds LS2 7PS UK. Fax : +44 113 2345656       ]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic