Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [Bug 104705] emerge doesn't print complete error message
Date: Mon, 24 Oct 2005 07:25:18
1 Commented on the bug due to reasoning behind this patch. Essentially, SIGTERM
2 is sent to "tee", a WNOHANG waitpid() is performed followed by SIGKILL if it
3 hasn't exited. So if tee doesn't exit immediately upon getting the SIGTERM,
4 its buffers won't get a chance to get to disk due to it being killed. This
5 patch simply adds a 1 second window between the SIGTERM and the SIGKILL.
7 One question; is the waitpid(x,0) necessary in the case where SIGKILL wasn't
8 sent? Is waitpid(x,os.NOHANG) enough to clean up the zombie when SIGTERM
9 succeeds? If so, the waitpid(x,0) could be indented into the "if not
10 timeout:" block.
12 --
13 Jason Stubbs


File name MIME type
sigterm-timeout.patch text/x-diff