Commit c0adf81c authored by Julien Muchembled's avatar Julien Muchembled

qa: fix occasional deadlock when starting subprocesses in functional tests

parent 01a01c8c
......@@ -206,6 +206,13 @@ class NEOLogger(Logger):
self._setup(filename, reset)
__del__ = setup
def fork(self):
with self:
pid = os.fork()
if pid:
return pid
self._setup()
def isEnabledFor(self, level):
return True
......
......@@ -158,7 +158,7 @@ class NEOProcess(object):
if args:
os.close(w)
os.kill(os.getpid(), signal.SIGSTOP)
self.pid = os.fork()
self.pid = logging.fork()
if self.pid:
# Wait that the signal to kill the child is set up.
os.close(w)
......@@ -168,8 +168,6 @@ class NEOProcess(object):
else:
# Child
try:
# release SQLite debug log
logging.setup()
signal.signal(signal.SIGTERM, lambda *args: sys.exit())
if coverage:
coverage.stop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment