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 |