From: ana Date: Mon, 23 Nov 2015 15:22:13 +0000 (+0300) Subject: Fix for the bug 0023165: [CEA 1590] Salome 7.6.0 on Windows does not liberate the... X-Git-Tag: V8_0_0a1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=96b867343a77509718ec848a71993b77d40cf0d4;p=modules%2Fkernel.git Fix for the bug 0023165: [CEA 1590] Salome 7.6.0 on Windows does not liberate the ports Additional fix to previous commit --- diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index a1057d8ad..31eaceb1b 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -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