Merge pull request #247 from dw/issue179

issue #179: don't reap first stage until core_src_fd is drained.
This commit is contained in:
dw 2018-05-11 22:18:31 +01:00 committed by GitHub
commit f01f237e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1626,6 +1626,8 @@ class ExternalContext(object):
listen(self.broker, 'exit', self._on_broker_exit)
os.close(in_fd)
def _reap_first_stage(self):
try:
os.wait() # Reap first stage.
except OSError:
@ -1746,6 +1748,7 @@ class ExternalContext(object):
try:
self._setup_logging(debug, log_level)
self._setup_importer(importer, core_src_fd, whitelist, blacklist)
self._reap_first_stage()
if setup_package:
self._setup_package()
self._setup_globals(version, context_id, parent_ids)