On Sun, 26 Nov 2006 10:57:11 +0100
Bill Allombert <[EMAIL PROTECTED]> wrote:

> On Mon, Nov 20, 2006 at 02:15:20PM +0100, Tim Dijkstra (tdykstra) wrote:
> > Package: menu
> > Version: Patch to just fork and die, instead of waiting on a signal
> > Followup-For: Bug #374834
> > 
> > Hi,
> > 
> > I prepared a patch that removes the singal business. The logic used to
> > be:
> >     - Parent forks, stays waiting for a signal to die, blocking dpkg.
> >     - child would see if it really needs to exist. Create the string for a
> >       stdout file. Tell the user, then tell the parent to die.
> >       Waits for dpkg to finish.
> > Now:
> >     - Parent checks if fork is really needed. Forks. Creates string for 
> > stdout
> >       file, tells user about it. Dies.
> >     - Child waits for dpkg to finish.
> > 
> > Would be nice if you could try to get this into etch (if indeed this looks
> > harmless to you). Maybe Mario can check that it works for him too.
> 
> Hello Tim,
> 
> The issue is that this patch cause a regression in behaviour, by
> re-adding the race condition the signal code was added to prevent.

No, it is not adding any race condition. If understand correctly from
the comments in the code, you are referring to the fact that the child
could print to stdout after the parent has already died, hence
cluttering other dpkg output, right?

My patch does all the work that could print to stdout in the _parent_,
avoiding the 'race condition' altogether. All the child does is wait,
the same the original would version is supposed to do.

grts Tim


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

Reply via email to