Salome HOME
PR: ROOT_DIR to virtual link = APPLI directory
[modules/kernel.git] / bin / addToKillList.py
index 2d26f669871a93420d686db53f9365dcad47de48..390ac2aaad41d7f2a6850cc43140ec35d240c0d5 100755 (executable)
@@ -1,5 +1,24 @@
 #!/usr/bin/env python
 
+# Copyright (C) 2005  OPEN CASCADE, CEA, EDF R&D, LEG
+#           PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
+# 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.
+# 
+# This library is distributed in the hope that it will be useful 
+# but WITHOUT ANY WARRANTY; without even the implied warranty of 
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public  
+# License along with this library; if not, write to the Free Software 
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# 
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# 
+
 import os, sys, pickle, string, signal
 
 ########## adds to the kill list of SALOME one more process ##########
@@ -29,7 +48,8 @@ def findFileDict():
     
 def addToKillList(command_pid, command):
     my_port = findFileDict()
-    filedict=os.getenv("HOME")+'/'+os.getenv('USER')+"_"+str(my_port)+'_SALOME_pidict'
+    from killSalomeWithPort import getPiDict
+    filedict=getPiDict(my_port)
     try:
         fpid=open(filedict, 'r')
         process_ids=pickle.load(fpid)
@@ -64,7 +84,8 @@ def addToKillList(command_pid, command):
 
 def killList():
     my_port = findFileDict()
-    filedict=os.getenv("HOME")+'/'+os.getenv('USER')+"_"+str(my_port)+'_SALOME_pidict'
+    from killSalomeWithPort import getPiDict
+    filedict=getPiDict(my_port)
     try:
         fpid=open(filedict, 'r')
         process_ids=pickle.load(fpid)