From 128bc21704c974197a32c4411af90556f12218f0 Mon Sep 17 00:00:00 2001 From: Adrien Bruneton Date: Wed, 12 Feb 2014 14:34:45 +0100 Subject: [PATCH] Bug fix: option "--shutdown-server" is now implemented in Cedric's new SALOME runner. This prevents random bugs with the option, when the killSalome logic was called at a time where Python was already half shut down. --- bin/salomeRunner.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/salomeRunner.py b/bin/salomeRunner.py index 5be7955a7..f92c206a2 100644 --- a/bin/salomeRunner.py +++ b/bin/salomeRunner.py @@ -84,9 +84,17 @@ class SalomeRunner: def go(self, args): # Run this module as a script, in order to use appropriate Python interpreter # according to current path (initialized from environment files). + kill = False + for e in args: + if "--shutdown-server" in e: + kill = True + args.remove(e) + absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeRunner.py"), pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True) proc.communicate() + if kill: + self._killAll(args) # """Append value to PATH environment variable""" -- 2.39.2