]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for the bug 0023165: [CEA 1590] Salome 7.6.0 on Windows does not liberate the...
authorana <ana@opencascade.com>
Mon, 23 Nov 2015 15:22:13 +0000 (18:22 +0300)
committerana <ana@opencascade.com>
Mon, 23 Nov 2015 15:22:13 +0000 (18:22 +0300)
Additional fix to previous commit

bin/killSalomeWithPort.py

index a1057d8ad9a29cc17abbe0951239bb4095928454..31eaceb1b90b4277655241441766e8caa59683a3 100755 (executable)
@@ -354,19 +354,14 @@ def cleanApplication(port):
 def killMyPortSpy(pid, port):
     dt = 1.0
     while 1:
-        if sys.platform == "win32":
-            from salome_utils import win32killpid
-            if win32killpid(int(pid)) != 0:
+        try:
+            from salome_utils import killpid
+            killpid(int(pid))
+        except OSError, e:
+            if e.errno != 3:
                 return
-        else:
-            from os import kill
-            try:
-                kill(int(pid), 0)
-            except OSError, e:
-                if e.errno != 3:
-                    return
-                break
-            pass
+            break
+        pass
         from time import sleep
         sleep(dt)
         pass