summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/AbstractEbuildProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-15 16:00:35 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-15 16:00:35 -0800
commitc4451a1e94212025e060cfd8e6a2341527202086 (patch)
tree5080bcc79734a5f93086dac12192ea0d621060eb /pym/_emerge/AbstractEbuildProcess.py
parente2a3237b4018e274350488868577c4d74a496b85 (diff)
downloadportage-c4451a1e94212025e060cfd8e6a2341527202086.tar.gz
portage-c4451a1e94212025e060cfd8e6a2341527202086.tar.bz2
portage-c4451a1e94212025e060cfd8e6a2341527202086.zip
Add PollScheduler.terminate() for interruption.
This allows PollScheduler instances to do basic cleanup and terminate gracefully when SIGINT or SIGTERM signals are received.
Diffstat (limited to 'pym/_emerge/AbstractEbuildProcess.py')
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 46c8f938f..601aafe0e 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import platform
@@ -237,11 +237,12 @@ class AbstractEbuildProcess(SpawnProcess):
self.returncode = self._exit_command.exitcode
else:
self.returncode = 1
- self._unexpected_exit()
+ if not self.cancelled:
+ self._unexpected_exit()
if self._build_dir is not None:
self._build_dir.unlock()
self._build_dir = None
- else:
+ elif not self.cancelled:
exit_file = self.settings.get('PORTAGE_EBUILD_EXIT_FILE')
if exit_file and not os.path.exists(exit_file):
self.returncode = 1