Salome HOME
Deal with ref count server side.
[modules/kernel.git] / bin / addToKillList.py
index 91068ee45ec2482cfbe2a7c990b5410182134a6f..7d688aca2d579a6ab7665b3c90102736895d0f75 100755 (executable)
@@ -8,7 +8,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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()
-    try:
-        import PortManager
-        filedict = getPiDict(port, hidden=True, with2809pid=True)
-    except:
-        filedict=getPiDict(port)
+    filedict = getPiDict(port)
 
     try:
         with open(filedict, 'r') as fpid:
@@ -71,6 +67,7 @@ def addToKillList(command_pid, command, port=None):
             pass
         if already_in: break
         pass
+
     # 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()
+
     # 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)
+
     try:
         with open(filedict, 'r') as fpid:
             process_ids=pickle.load(fpid)