Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #19241 Prevent shaper tests hanging up
[modules/kernel.git]
/
bin
/
killSalomeWithPort.py
diff --git
a/bin/killSalomeWithPort.py
b/bin/killSalomeWithPort.py
index 4c8f197f0f86c921ce49b89200c35d9c7f6f2311..66fd32671d5bc2da8223bdbe7f8c1ccbfb1d00b3 100755
(executable)
--- a/
bin/killSalomeWithPort.py
+++ b/
bin/killSalomeWithPort.py
@@
-1,6
+1,6
@@
#! /usr/bin/env python3
# -*- coding: iso-8859-1 -*-
#! /usr/bin/env python3
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-20
17
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-71,12
+71,12
@@
def getPiDict(port,appname='salome',full=True,hidden=True,hostname=None):
# full path to the pidict file is requested
if hidden:
# new-style dot-prefixed pidict files
# full path to the pidict file is requested
if hidden:
# new-style dot-prefixed pidict files
- # are in the system-dependant temporary diretory
+ # are in the system-dependant temporary dire
c
tory
dir = getLogDir()
else:
# old-style non-dot-prefixed pidict files
# are in the user's home directory
dir = getLogDir()
else:
# old-style non-dot-prefixed pidict files
# are in the user's home directory
- dir = os.
getenv("HOME
")
+ dir = os.
path.expanduser("~
")
pass
pass
pass
pass
@@
-208,18
+208,23
@@
def shutdownMyPort(port, cleanup=True):
time.sleep(1)
# shutdown omniNames
if cleanup:
time.sleep(1)
# shutdown omniNames
if cleanup:
- lcc.killOmniNames()
- time.sleep(1)
- pass
+ from salome_utils import killOmniNames
+ killOmniNames(port)
+ filedict=getPiDict(port)
+ __killMyPort(port, filedict)
+ from PortManager import releasePort
+ releasePort(port)
+ time.sleep(1)
+ pass
pass
except:
pass
sys.exit(0) # see (1)
pass
# (1) If --shutdown-servers option is set to 1, session close procedure is
pass
except:
pass
sys.exit(0) # see (1)
pass
# (1) If --shutdown-servers option is set to 1, session close procedure is
-# called twice: first explicit
e
ly by salome command, second by automatic
+# called twice: first explicitly by salome command, second by automatic
# atexit to handle Ctrl-C. During second call, LCC does not exist anymore and
# atexit to handle Ctrl-C. During second call, LCC does not exist anymore and
-# a RuntimeError is raised; we explicit
e
ly exit this function with code 0 to
+# a RuntimeError is raised; we explicitly exit this function with code 0 to
# prevent parent thread from crashing.
def __killMyPort(port, filedict):
# prevent parent thread from crashing.
def __killMyPort(port, filedict):