Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [0/7] portage_exec cleanups (WAS: [Bug 104705] emerge doesn't print complete error message)
Date: Sat, 29 Oct 2005 17:38:21
Message-Id: 200510300238.40045.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [0/7] portage_exec cleanups (WAS: [Bug 104705] emerge doesn't print complete error message) by Jason Stubbs
1 On Sunday 30 October 2005 02:32, Jason Stubbs wrote:
2 > On Saturday 29 October 2005 19:34, Jason Stubbs wrote:
3 > > On Sunday 23 October 2005 15:45, Jason Stubbs wrote:
4 > > > Commented on the bug due to reasoning behind this patch. Essentially,
5 > > > SIGTERM is sent to "tee", a WNOHANG waitpid() is performed followed by
6 > > > SIGKILL if it hasn't exited. So if tee doesn't exit immediately upon
7 > > > getting the SIGTERM, its buffers won't get a chance to get to disk due
8 > > > to it being killed. This patch simply adds a 1 second window between
9 > > > the SIGTERM and the SIGKILL.
10 > >
11 > > Per discussion on the bug, the problem is actually that tee shouldn't be
12 > > sent a SIGTERM or SIGKILL at all. The decided solution was to wait on tee
13 > > rather ebuild. I went a bit further than that though and cleaned up most
14 > > of spawn().
15 >
16 > Here's the full patch after incorporating feedback. It should be fairly
17 > easy to follow given the other explanations. The only change beyond what's
18 > already been gone over is that spawn() is now removing pids from
19 > spawned_pids as it cleans them up.
20
21 02:30.. Brain is starting to stop working. Here's a patch of _just_
22 portage_exec.py. With regard to splitting up patches, I agree it's much
23 easier to parse a complete patch when familiar with the code. When one isn't
24 familiar with the code however... Splitting it up a bit makes explaining the
25 whys easier too - as well as keeping discussion threads seperate.
26
27 --
28 Jason Stubbs

Attachments

File name MIME type
exec-cleanup.patch text/x-diff