From 9d2db3f13140bbb4db8193de210edbdd96053b18 Mon Sep 17 00:00:00 2001 From: prascle Date: Mon, 19 Apr 2004 06:50:44 +0000 Subject: [PATCH] PR: bug when calling killSalome from shell --- bin/killSalome.py | 2 +- bin/killSalomeWithPort.py | 2 +- bin/runSalome | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/killSalome.py b/bin/killSalome.py index 828c354ae..96e923980 100755 --- a/bin/killSalome.py +++ b/bin/killSalome.py @@ -13,5 +13,5 @@ def killAllPorts(): killMyPort(l[len(l)-3]) pass -if sys.argv[0] == "killSalome.py": +if __name__ == "__main__": killAllPorts() diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index 3b364f955..7c8dcd2ed 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -36,6 +36,6 @@ def killMyPort(port): pid = commands.getoutput("ps -eo pid,command | egrep \"[0-9] omniNames -start "+str(port)+"\" | sed -e \"s%[^0-9]*\([0-9]*\) .*%\\1%g\"") -if sys.argv[0] == "killSalomeWithPort.py": +if __name__ == "__main__": for port in sys.argv[1:]: killMyPort(port) diff --git a/bin/runSalome b/bin/runSalome index 37f6614e2..9577ea58e 100755 --- a/bin/runSalome +++ b/bin/runSalome @@ -32,7 +32,7 @@ fi # # $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall # -# parameter from command line supersedes thoses from $HOME/.salome/salome.launch +# parameters from command line supersede those from $HOME/.salome/salome.launch # # Some CORBA servers could be launched in the SALOME_Session_Server # (embedded = same process) or in a separate process (standalone): -- 2.39.2