summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()
+