From ff53302041af5c6a54ab2fc59bbd1fc81eb0de67 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 Aug 2010 17:52:50 -0700 Subject: Allow more time for natural exit of the ebuild process after it has called the exit command via IPC. --- pym/_emerge/AbstractEbuildProcess.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pym/_emerge/AbstractEbuildProcess.py') 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 -- cgit v1.2.3-1-g7c22