summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-13 21:53:39 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-13 21:53:39 -0700
commita3e9c36fd8d199bb5ecbbfa3eb50e451bafd8b86 (patch)
treee1b927de5d030ee27a8a40b5267648e17d28edd4 /pym
parent8b73b101f9f5bc9892b2b8f651625fba372c2db6 (diff)
downloadportage-a3e9c36fd8d199bb5ecbbfa3eb50e451bafd8b86.tar.gz
portage-a3e9c36fd8d199bb5ecbbfa3eb50e451bafd8b86.tar.bz2
portage-a3e9c36fd8d199bb5ecbbfa3eb50e451bafd8b86.zip
Add back the POLLHUP handling for now since PipeReaderTestCase breaks
without it.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/AbstractPollTask.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py
index b654a615f..1feee15f6 100644
--- a/pym/_emerge/AbstractPollTask.py
+++ b/pym/_emerge/AbstractPollTask.py
@@ -10,7 +10,7 @@ class AbstractPollTask(AsynchronousTask):
_bufsize = 4096
_exceptional_events = PollConstants.POLLERR | PollConstants.POLLNVAL
- _registered_events = PollConstants.POLLIN | \
+ _registered_events = PollConstants.POLLIN | PollConstants.POLLHUP | \
_exceptional_events
def _unregister(self):
@@ -21,3 +21,7 @@ class AbstractPollTask(AsynchronousTask):
if event & self._exceptional_events:
self._unregister()
self.cancel()
+ elif event & PollConstants.POLLHUP:
+ self._unregister()
+ self.wait()
+