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@??? 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@??? - 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 ]