]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for bug NPAL14859 : Some Process are not killed by killSalome.py.
authormkr <mkr@opencascade.com>
Wed, 28 Feb 2007 06:45:10 +0000 (06:45 +0000)
committermkr <mkr@opencascade.com>
Wed, 28 Feb 2007 06:45:10 +0000 (06:45 +0000)
bin/killSalome.py

index 2d93685ef505facf406d5ad219729604dd4695c6..9e65ae4cebbe62db53211068127eda70ec3e09de 100755 (executable)
@@ -33,5 +33,21 @@ def killAllPorts():
             killMyPort(mo.groups()[0])
         pass
 
+    cmd = "pid=`ps -fea | grep '"+os.getenv('USER')+"' | grep 'ghs3d' | grep 'f /tmp/GHS3D_' | grep -v 'grep' | awk '{print $2}'` ; echo $pid > /tmp/logs/"+os.getenv('USER')+"/_"+"Pid_ghs3d.log"
+    a = os.system(cmd)
+    try:
+        fpidomniNames=open('/tmp/logs/'+os.getenv('USER')+"/_"+"Pid_ghs3d.log")
+        prc = fpidomniNames.read()
+        fpidomniNames.close()
+        if prc != None :
+            for field in prc.split(" ") :
+                field = field.strip()
+                if field != None and len(field) != 0:
+                    os.system('kill -9 '+field)
+    except:
+        pass
+    pass
+
 if __name__ == "__main__":
     killAllPorts()
+