From 480f3d43c118d838a1ad3a4eeb32109c25f7bc69 Mon Sep 17 00:00:00 2001 From: prascle Date: Mon, 22 Nov 2004 09:49:18 +0000 Subject: [PATCH] PR: problem when runSalome.py is used without args. There is still a problem on killSalome whith --xterm: not solved. --- bin/runSalome.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/bin/runSalome.py b/bin/runSalome.py index 3ef483331..30e0a0119 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -179,7 +179,7 @@ from killSalome import killAllPorts 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 @@ -191,7 +191,21 @@ def killLocalPort(): 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("< 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. -- 2.39.2