From 0ce02a17f72ba0234f8bf40711955731ac91e770 Mon Sep 17 00:00:00 2001 From: mkr Date: Wed, 28 Feb 2007 06:45:10 +0000 Subject: [PATCH] Fix for bug NPAL14859 : Some Process are not killed by killSalome.py. --- bin/killSalome.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bin/killSalome.py b/bin/killSalome.py index 2d93685ef..9e65ae4ce 100755 --- a/bin/killSalome.py +++ b/bin/killSalome.py @@ -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() + -- 2.39.2