def _killAll(self, args=[]):
absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','')
try:
- import PortManager
- ports = PortManager.getBusyPorts()
-
+ import PortManager # mandatory
from multiprocessing import Process
from killSalomeWithPort import killMyPort
+ ports = PortManager.getBusyPorts()
+
if ports:
import tempfile
for port in ports:
p = Process(target = killMyPort, args=(port,))
p.start()
p.join()
+
+ p = Process(target = killMyPort, args=(2809,))
+ p.start()
+ p.join()
except ImportError:
+ from killSalome import killAllPorts
+ killAllPorts()
pass
- p = Process(target = killMyPort, args=(2809,))
- p.start()
- p.join()
-
#
def _showInfo(self, args=[]):
Returns first found free port number.
"""
try:
+ import PortManager # mandatory
from multiprocessing import Process, Queue
queue = Queue()
p = Process(target = searchFreePort_withPortManager, args=(queue, args, save_config, use_port,))