]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Issue 0019872: fix pb of killing SALOME processes (files in /tmp/logs/${USER} directo...
authorvsr <vsr@opencascade.com>
Wed, 9 Jul 2008 04:44:48 +0000 (04:44 +0000)
committervsr <vsr@opencascade.com>
Wed, 9 Jul 2008 04:44:48 +0000 (04:44 +0000)
bin/killSalome.py
bin/nameserver.py
bin/runNS.py

index 722fd31c72c92d803a025f8900e666a9011770e8..ed9164cf5388bf3202d2fe5e40ff27fda4915927 100755 (executable)
@@ -33,26 +33,24 @@ def killAllPorts():
     dirpidict = os.path.dirname(fpidict)
     fpidict   = os.path.basename(fpidict)
     fnamere   = re.compile("^%s$" % fpidict)
-    try:
-        for f in os.listdir(dirpidict):
-            mo = fnamere.match(f)
-            if mo: killMyPort(mo.group(1))
-            pass
-        pass
-    except:
+    for f in os.listdir(dirpidict):
+        mo = fnamere.match(f)
+       try:
+            killMyPort(mo.group(1))
+        except:
+           pass
         pass
     # provide compatibility with old-style pidict file (not dot-prefixed)
     fpidict   = getPiDict('(\d*)',hidden=False)
     dirpidict = os.path.dirname(fpidict)
     fpidict   = os.path.basename(fpidict)
     fnamere   = re.compile("^%s$" % fpidict)
-    try:
-        for f in os.listdir(dirpidict):
-            mo = fnamere.match(f)
-            if mo: killMyPort(mo.group(1))
-            pass
-        pass
-    except:
+    for f in os.listdir(dirpidict):
+        mo = fnamere.match(f)
+        try:
+            killMyPort(mo.group(1))
+       except:
+           pass
         pass    
     # kill other processes
     if sys.platform != 'win32':
index 8c039b1c520d5aa61b9c3b2b55e5cf3a5f1ea09e..99ec4c3b2f06d19a401fe0ea15d7d2875b00cee4 100755 (executable)
@@ -46,7 +46,7 @@ class NamingServer(Server):
         #os.system("touch " + upath + "/dummy")
         for fname in os.listdir(upath):
           try:
-            os.remove(upath + "/" + fname)
+            if not fname.startswith("."): os.remove(upath + "/" + fname)
           except:
             pass
         #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
index 44476036965a6c885b9f56b0eb61bc4399b908dc..601c7b00d3dabb7ef1474d4a65981f0c9e90db2e 100755 (executable)
@@ -39,7 +39,7 @@ def startOmni():
   #os.system("touch " + upath + "/dummy")
   for fname in os.listdir(upath):
     try:
-      os.remove(upath + "/" + fname)
+      if not fname.startswith("."): os.remove(upath + "/" + fname)
     except:
       pass
   #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")