From be3a837c912d3dc90386334e5e389813aa77773a Mon Sep 17 00:00:00 2001 From: drebs Date: Sat, 9 Feb 2013 20:38:55 -0200 Subject: Couch server subprocess for tests now waits for returncode to avoid zombie childs. --- src/leap/soledad/tests/test_couch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/leap/soledad/tests/test_couch.py b/src/leap/soledad/tests/test_couch.py index 55bcf442..09c7269e 100644 --- a/src/leap/soledad/tests/test_couch.py +++ b/src/leap/soledad/tests/test_couch.py @@ -57,7 +57,8 @@ class CouchDBWrapper(object): args = ['couchdb', '-n' '-a', confPath] #null = open('/dev/null', 'w') self.process = subprocess.Popen( - args, env=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + args, env=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + close_fds=True) # find port logPath = os.path.join(self.tempdir, 'log', 'couch.log') while not os.path.exists(logPath): @@ -87,7 +88,7 @@ stderr: def stop(self): self.process.terminate() - + self.process.wait() os.system("rm -rf %s" % self.tempdir) -- cgit v1.2.3