def killLocalPort(args):
"""
kill servers from a previous SALOME exection, if needed,
- on the same CORBA port
+ on the CORBA port given in args of runSalome
"""
from killSalomeWithPort import killMyPort
pass
pass
+def givenPortKill(port):
+ """
+ kill servers from a previous SALOME exection, if needed,
+ on the same CORBA port
+ """
+ from killSalomeWithPort import killMyPort
+ my_port=port
+ try:
+ killMyPort(my_port)
+ except:
+ print "problem in LocalPortKill(), killMyPort("<<port<<")"
+ pass
+ pass
+
def kill_salome(args):
"""
Kill servers from previous SALOME executions, if needed;
if args['killall']:
killAllPorts()
elif args['portkill']:
- killLocalPort(args)
+ givenPortKill(str(args['port']))
# -----------------------------------------------------------------------------
#
self.SCMD2=['-personal',
'${HOME}/Salome/resources/CatalogModulePersonnel.xml']
- def setpath(self,modules_list):
+ def setpath(self,modules_list,modules_root_dir):
cata_path=[]
list_modules = modules_list[:]
list_modules.reverse()
if 'moduleCatalog' not in args['embedded']:
cataServer=CatalogServer(args)
- cataServer.setpath(modules_list)
+ cataServer.setpath(modules_list,modules_root_dir)
cataServer.run()
import SALOME_ModuleCatalog
clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
To kill SALOME processes from a console (kill all sessions from all ports):
python killSalome.py
To kill SALOME from the present interpreter, if it is not closed :
- killLocalPort() --> kill this session
- killAllPorts() --> kill all sessions
+ killLocalPort() --> kill this session
+ (use CORBA port from args of runSalome)
+ givenPortKill(port) --> kill a specific session with given CORBA port
+ killAllPorts() --> kill all sessions
runSalome, with --killall option, starts with killing
the processes resulting from the previous execution.