On Fri, Dec 15, 2006 at 09:05:35PM +0100, Tim Dijkstra wrote:
> On Fri, 15 Dec 2006 18:11:21 +0100
> Bill Allombert <[EMAIL PROTECTED]> wrote:
> 
> > So far none of the people affected has been positive that it actually
> > fixed the bug for them. This is a problem.
> 
> Sure it does, it fixes it for me. And I think I convincingly argued why
> it does. Mario and Yan could you please verufy that the attached patch
> works for you to?

Then that's fine with me. You did not say so before and Mario stated he
could not test whether it worked.

> > What worry me about the patch is the fact that create_lock() and
> > check_dpkglock() are not performed in the same order. In particular, if
> > create_lock() fail we exit with error 0 instead of 1 thus maybe
> > concealing a real error.
> 
> You used to exit with 1 only if both creat_lock and check_dpkglock were
> false at the same time. If that is what you want, that is easy to fix. 
> New patch attached. The locking logic is now the same as in the original.

If I am not mistaken, your new patch adds a race condition between
create_lock() and check_dpkglock().  If dpkg release the lock after
create_lock() and before check_dpkglock(), then we do exit(1) while we
should not. In the original version, check_dpkglock was checked first
so this race condition was not possible.

Sorry to be so slow dealing with this issue...

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large blue swirl here. 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to