]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[bos #35167][CEA] Salome process gets detached. Reverted commented import, added...
authorKonstantin Leontev <Konstantin.LEONTEV@opencascade.com>
Mon, 22 May 2023 11:51:32 +0000 (12:51 +0100)
committerjfa <jfa@opencascade.com>
Mon, 22 May 2023 14:59:44 +0000 (15:59 +0100)
bin/runSalome.py

index 1a0e1134bf88c84baee812b6ed0771c3913b928d..4e22e7ad622f7ca5a594cc2bae9328fa2545584b 100755 (executable)
@@ -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