On Saturday 29 October 2005 19:34, Jason Stubbs wrote: > On Sunday 23 October 2005 15:45, Jason Stubbs wrote: > > Commented on the bug due to reasoning behind this patch. Essentially, > > SIGTERM is sent to "tee", a WNOHANG waitpid() is performed followed by > > SIGKILL if it hasn't exited. So if tee doesn't exit immediately upon > > getting the SIGTERM, its buffers won't get a chance to get to disk due to > > it being killed. This patch simply adds a 1 second window between the > > SIGTERM and the SIGKILL. > > Per discussion on the bug, the problem is actually that tee shouldn't be > sent a SIGTERM or SIGKILL at all. The decided solution was to wait on tee > rather ebuild. I went a bit further than that though and cleaned up most of > spawn(). Here's the full patch after incorporating feedback. It should be fairly easy to follow given the other explanations. The only change beyond what's already been gone over is that spawn() is now removing pids from spawned_pids as it cleans them up. -- Jason Stubbs