]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Porting SALOME 6.3.1 on Win 32 platform.
authorrnv <rnv@opencascade.com>
Thu, 14 Jul 2011 07:42:21 +0000 (07:42 +0000)
committerrnv <rnv@opencascade.com>
Thu, 14 Jul 2011 07:42:21 +0000 (07:42 +0000)
bin/killSalomeWithPort.py
bin/runSalome.py

index 99c092c1f935aff78a5181a702492be97599b721..bf7ee48dfb8d53edf4ce5c07a72c6bebaa5088d4 100755 (executable)
@@ -208,7 +208,7 @@ def killMyPort(port):
                     try:
                         if sys.platform == "win32":
                             import win32pm
-                            win32pm.killpid(int(pid),0)
+                            win32pm.killpid(int(pid),0)                            
                         else:
                             os.kill(int(pid),signal.SIGKILL)
                             pass
@@ -265,9 +265,14 @@ def killNotifdAndClean(port):
 def killMyPortSpy(pid, port):
     dt = 1.0
     while 1:
-        from os import kill
         try:
-            kill(int(pid), 0)
+          if sys.platform != "win32":
+            from os import kill
+            win32pm.killpid(int(pid),0)
+          else:
+            from win32pm import killpid
+            if killpid(int(pid), 0) != 0:
+                return
         except OSError, e:
             if e.errno != 3:
                 return
index 62b19a4f4e96e6f52fdfa83e87d7a5bb866b30b5..e8dd6845ca01affceceb9bd1e52bdd88e4008dc4 100755 (executable)
@@ -984,8 +984,11 @@ def foreGround(clt, args):
     port = getPortNumber()
     # --
     server = Server({})
-    server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)]
-    server.run()
+    if sys.platform == "win32":
+      server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)]
+    else:
+      server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)]
+    server.run()   
     # os.system("killSalomeWithPort.py --spy %s %s &"%(os.getpid(), port))
     # --
     dt = 1.0