def killLocalPort():
"""
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()
+ givenPortKill(str(args['port']))
# -----------------------------------------------------------------------------
#
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.