summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-22 17:52:50 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-22 17:52:50 -0700
commitff53302041af5c6a54ab2fc59bbd1fc81eb0de67 (patch)
tree9c34d8e5f301ed515855778b23fc1668f7b9aed4
parentc683ee0d520e86d896e28d7699cd5aeb3c305c4e (diff)
downloadportage-ff53302041af5c6a54ab2fc59bbd1fc81eb0de67.tar.gz
portage-ff53302041af5c6a54ab2fc59bbd1fc81eb0de67.tar.bz2
portage-ff53302041af5c6a54ab2fc59bbd1fc81eb0de67.zip
Allow more time for natural exit of the ebuild process after it has
called the exit command via IPC.
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 8c87812f5..ecd44f5af 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -25,6 +25,13 @@ class AbstractEbuildProcess(SpawnProcess):
('_ipc_daemon', '_exit_command',)
_phases_without_builddir = ('clean', 'cleanrm', 'depend', 'help',)
+ # Number of milliseconds to allow natural exit of the ebuild
+ # process after it has called the exit command via IPC. It
+ # doesn't hurt to be generous here since the scheduler
+ # continues to process events during this period, and it can
+ # return long before the timeout expires.
+ _exit_timeout = 10000 # 10 seconds
+
# The EbuildIpcDaemon support is well tested, but this variable
# is left so we can temporarily disable it if any issues arise.
_enable_ipc_daemon = True
@@ -119,10 +126,8 @@ class AbstractEbuildProcess(SpawnProcess):
def _exit_command_callback(self):
if self._registered:
- # Let the process exit naturally, if possible. This
- # doesn't really do any harm since it can return
- # long before the timeout expires.
- self.scheduler.schedule(self._reg_id, timeout=1000)
+ # Let the process exit naturally, if possible.
+ self.scheduler.schedule(self._reg_id, timeout=self._exit_timeout)
if self._registered:
# If it doesn't exit naturally in a reasonable amount
# of time, kill it (solves bug #278895). We try to avoid