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:31:55
Message-Id: 200510300232.22417.jstubbs@gentoo.org
In Reply to: [gentoo-portage-dev] [0/7] portage_exec cleanups (WAS: [Bug 104705] emerge doesn't print complete error message) by Jason Stubbs
1 On Saturday 29 October 2005 19:34, Jason Stubbs wrote:
2 > On Sunday 23 October 2005 15:45, Jason Stubbs wrote:
3 > > Commented on the bug due to reasoning behind this patch. Essentially,
4 > > SIGTERM is sent to "tee", a WNOHANG waitpid() is performed followed by
5 > > SIGKILL if it hasn't exited. So if tee doesn't exit immediately upon
6 > > getting the SIGTERM, its buffers won't get a chance to get to disk due to
7 > > it being killed. This patch simply adds a 1 second window between the
8 > > SIGTERM and the SIGKILL.
9 >
10 > Per discussion on the bug, the problem is actually that tee shouldn't be
11 > sent a SIGTERM or SIGKILL at all. The decided solution was to wait on tee
12 > rather ebuild. I went a bit further than that though and cleaned up most of
13 > spawn().
14
15 Here's the full patch after incorporating feedback. It should be fairly easy
16 to follow given the other explanations. The only change beyond what's already
17 been gone over is that spawn() is now removing pids from spawned_pids as it
18 cleans them up.
19
20 --
21 Jason Stubbs

Attachments

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

Replies