From: mkr Date: Wed, 28 Feb 2007 06:45:10 +0000 (+0000) Subject: Fix for bug NPAL14859 : Some Process are not killed by killSalome.py. X-Git-Tag: V3_2_6a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0ce02a17f72ba0234f8bf40711955731ac91e770;p=modules%2Fkernel.git Fix for bug NPAL14859 : Some Process are not killed by killSalome.py. --- 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() +