From: Konstantin Leontev Date: Mon, 22 May 2023 11:51:32 +0000 (+0100) Subject: [bos #35167][CEA] Salome process gets detached. Reverted commented import, added... X-Git-Tag: emc2p_1.4.0-rc1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fkleontev%2F35167_salome_process_gets_detached;p=modules%2Fkernel.git [bos #35167][CEA] Salome process gets detached. Reverted commented import, added early return and debug message for not found session. --- diff --git a/bin/runSalome.py b/bin/runSalome.py index 1a0e1134b..4e22e7ad6 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -230,7 +230,7 @@ def foreGround(args, ior_fakens_filename): return import CORBA #import Engines - #import SALOME + import SALOME from time import sleep orb = CORBA.ORB_init([''], CORBA.ORB_ID) ior_fakens = None @@ -254,6 +254,11 @@ def foreGround(args, ior_fakens_filename): logger.debug("Unfortunately Session not found into {} : Sleep and retry. {}/{}".format(ior_fakens_filename,nb,nbtot)) if nb == nbtot: break + + if session is None: + logger.debug("Couldn't find /Kernel/Session in the child process. Return.") + return + nb = 0 # -- # Wait until gui is arrived @@ -277,6 +282,7 @@ def foreGround(args, ior_fakens_filename): pass # -- if not gui_detected: + logger.debug("Couldn't find active GUI in the current session. Return.") return # -- from salome_utils import getPortNumber