aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-16 13:42:59 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-16 13:42:59 -0800
commitf5e04fa4d74fc404cb067ecedf1adb7e5fc8846f (patch)
treebe4d10663749aa0fdac4df17e08b3f6cc27857c4 /pym/portage/util
parentEventLoop: fix _sigchld_io_cb to return True (diff)
downloadportage-f5e04fa4d74fc404cb067ecedf1adb7e5fc8846f.tar.gz
portage-f5e04fa4d74fc404cb067ecedf1adb7e5fc8846f.tar.bz2
portage-f5e04fa4d74fc404cb067ecedf1adb7e5fc8846f.zip
EventLoop: fix signal race in _sigchld_init
Diffstat (limited to 'pym/portage/util')
-rw-r--r--pym/portage/util/_eventloop/EventLoop.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/util/_eventloop/EventLoop.py b/pym/portage/util/_eventloop/EventLoop.py
index 3123cab66..9ca529fe1 100644
--- a/pym/portage/util/_eventloop/EventLoop.py
+++ b/pym/portage/util/_eventloop/EventLoop.py
@@ -242,11 +242,11 @@ class EventLoop(object):
return source_id
def _sigchld_init(self):
- signal.signal(signal.SIGCHLD, self._sigchld_sig_cb)
self._sigchld_read, self._sigchld_write = os.pipe()
fcntl.fcntl(self._sigchld_read, fcntl.F_SETFL,
fcntl.fcntl(self._sigchld_read, fcntl.F_GETFL) | os.O_NONBLOCK)
self.io_add_watch(self._sigchld_read, self.IO_IN, self._sigchld_io_cb)
+ signal.signal(signal.SIGCHLD, self._sigchld_sig_cb)
def _sigchld_sig_cb(self, signum, frame):
# If this signal handler was not installed by the