Salome HOME
This commit was generated by cvs2git to create tag 'V1_4_0b1'.
[modules/kernel.git] / src / Container / SALOME_ContainerPy.py
index 4d906f84de61e1ea23a9551894dc2fcb46840eb8..6444ef148dc70a8ef04cb63e819d057d1d57b351 100755 (executable)
@@ -85,12 +85,29 @@ class SALOME_ContainerPy_i (Engines__POA.Container):
             else :
                 MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object found without runSession" )
             return container
-        shstr = os.getenv( "PWD" ) + "/"
-        shstr += "runSession ./SALOME_ContainerPy.py "
+        #shstr = os.getenv( "PWD" ) + "/"
+        #shstr += "runSession ./SALOME_ContainerPy.py "
+        shstr = "runSession SALOME_ContainerPy.py "
         shstr += ContainerName
-        shstr += " > /tmp/"
-        shstr += ContainerName
-        shstr += ".log 2>&1 &"
+
+        # mpv: fix for SAL4731 - allways create new file to write log of server
+        num = 1
+        fileName = ""
+        while 1:
+            fileName = "/tmp/"+ContainerName+"_%i.log"%num
+            if not os.path.exists(fileName):
+                break
+            num += 1
+            pass
+        
+        shstr += " > "
+        shstr += fileName
+        shstr += " 2>&1 &"
+        
+        #shstr += " > /tmp/"
+        #shstr += ContainerName
+        #shstr += ".log 2>&1 &"
+        
         MESSAGE(  "SALOME_ContainerPy_i::start_impl " + "os.system(" + str(shstr) + ")" )
         os.system( shstr )
         count = 21