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
New params in config_appli to handle environment modules
[modules/kernel.git]
/
bin
/
addToKillList.py
diff --git
a/bin/addToKillList.py
b/bin/addToKillList.py
index de99c74775a3df05db0876395af34c0801daaa29..ca2abd93412ec2f67940379ce0158d5314c564f4 100755
(executable)
--- a/
bin/addToKillList.py
+++ b/
bin/addToKillList.py
@@
-1,6
+1,6
@@
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-201
6
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
@@
-22,7
+22,7
@@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import os, sys, pickle, s
tring, s
ignal
+import os, sys, pickle, signal
from launchConfigureParser import verbose
########## adds to the kill list of SALOME one more process ##########
from launchConfigureParser import verbose
########## adds to the kill list of SALOME one more process ##########
@@
-49,11
+49,7
@@
def addToKillList(command_pid, command, port=None):
# retrieve current processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
# retrieve current processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
- try:
- import PortManager
- filedict = getPiDict(port, hidden=True, with2809pid=True)
- except:
- filedict=getPiDict(port)
+ filedict = getPiDict(port)
try:
with open(filedict, 'r') as fpid:
try:
with open(filedict, 'r') as fpid:
@@
-64,13
+60,14
@@
def addToKillList(command_pid, command, port=None):
# check if PID is already in dictionary
already_in=False
for process_id in process_ids:
# check if PID is already in dictionary
already_in=False
for process_id in process_ids:
- for pid
, cmd in process_id.item
s():
+ for pid
in process_id.key
s():
if int(pid) == int(command_pid):
already_in=True
break
pass
if already_in: break
pass
if int(pid) == int(command_pid):
already_in=True
break
pass
if already_in: break
pass
+
# add process to the dictionary
if not already_in:
import types
# add process to the dictionary
if not already_in:
import types
@@
-98,10
+95,12
@@
def killList(port=None):
# retrieve processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
# retrieve processes dictionary
from killSalomeWithPort import getPiDict
if port is None: port=findFileDict()
+
# new-style dot-prefixed pidict file
# new-style dot-prefixed pidict file
- filedict=getPiDict(port
, hidden=True
)
+ filedict=getPiDict(port)
# provide compatibility with old-style pidict file (not dot-prefixed)
if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False)
# provide compatibility with old-style pidict file (not dot-prefixed)
if not os.path.exists(filedict): filedict = getPiDict(port, hidden=False)
+
try:
with open(filedict, 'r') as fpid:
process_ids=pickle.load(fpid)
try:
with open(filedict, 'r') as fpid:
process_ids=pickle.load(fpid)