summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/CompositeTask.py3
-rw-r--r--pym/_emerge/FifoIpcDaemon.py4
-rw-r--r--pym/_emerge/PipeReader.py4
-rw-r--r--pym/_emerge/SubProcess.py6
4 files changed, 7 insertions, 10 deletions
diff --git a/pym/_emerge/CompositeTask.py b/pym/_emerge/CompositeTask.py
index ddbfe6364..4667b7813 100644
--- a/pym/_emerge/CompositeTask.py
+++ b/pym/_emerge/CompositeTask.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from _emerge.AsynchronousTask import AsynchronousTask
@@ -15,6 +15,7 @@ class CompositeTask(AsynchronousTask):
self.cancelled = True
if self._current_task is not None:
self._current_task.cancel()
+ AsynchronousTask.cancel(self)
def _poll(self):
"""
diff --git a/pym/_emerge/FifoIpcDaemon.py b/pym/_emerge/FifoIpcDaemon.py
index ac83646b9..c31508a83 100644
--- a/pym/_emerge/FifoIpcDaemon.py
+++ b/pym/_emerge/FifoIpcDaemon.py
@@ -1,4 +1,4 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage import os
@@ -48,7 +48,7 @@ class FifoIpcDaemon(AbstractPollTask):
self.returncode = 1
self.cancelled = True
self._unregister()
- self.wait()
+ AbstractPollTask.cancel(self)
def _wait(self):
if self.returncode is not None:
diff --git a/pym/_emerge/PipeReader.py b/pym/_emerge/PipeReader.py
index 6952ffd7e..061921a79 100644
--- a/pym/_emerge/PipeReader.py
+++ b/pym/_emerge/PipeReader.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
from portage import os
@@ -36,7 +36,7 @@ class PipeReader(AbstractPollTask):
if self.returncode is None:
self.returncode = 1
self.cancelled = True
- self.wait()
+ AbstractPollTask.cancel(self)
def _wait(self):
if self.returncode is not None:
diff --git a/pym/_emerge/SubProcess.py b/pym/_emerge/SubProcess.py
index fc035d1e4..16c71fe3b 100644
--- a/pym/_emerge/SubProcess.py
+++ b/pym/_emerge/SubProcess.py
@@ -49,11 +49,7 @@ class SubProcess(AbstractPollTask):
if e.errno != errno.ESRCH:
raise
del e
-
- self.cancelled = True
- if self.pid is not None:
- self.wait()
- return self.returncode
+ AbstractPollTask.cancel(self)
def isAlive(self):
return self.pid is not None and \