From: Cédric Aguerre Date: Mon, 31 Mar 2014 13:39:13 +0000 (+0200) Subject: fix bug in salome connect X-Git-Tag: V7_4_0b1~4^2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c16bf7bc71a1b435b4a7af4d8d3b98ed4ef376dd;p=modules%2Fkernel.git fix bug in salome connect --- diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 37f181a73..424e613b6 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -110,7 +110,7 @@ class SalomeContext: args.remove(e) absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') - proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True) + proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True) proc.communicate() if kill: self._killAll(args) @@ -279,7 +279,8 @@ class SalomeContext: errmsg = [] for cmd in command: cmd = cmd.strip().split(' ') - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + #proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + proc = subprocess.Popen(cmd) (stdoutdata, stderrdata) = proc.communicate() if stdoutdata or stderrdata: outmsg.append(stdoutdata) @@ -299,8 +300,9 @@ class SalomeContext: import setenv setenv.main(True) - import runConsole - runConsole.connect() + cmd = ["python", "-c", "import runConsole\nrunConsole.connect()" ] + proc = subprocess.Popen(cmd, shell=False, close_fds=True) + proc.wait() # def _killAll(self, args=[]):