From 40db57fe3ba9f2ba2c0665d3f6ec01552c236c3d Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 8 Jun 2005 06:52:18 +0000 Subject: [PATCH] Fixing of PAL9090 bug: save Serser's pids not to the "/tmp" directory, but to the ${HOME} directory. --- bin/killSalome.py | 2 +- bin/killSalomeWithPort.py | 2 +- bin/runSalome.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/killSalome.py b/bin/killSalome.py index 96e923980..7ed1d6372 100755 --- a/bin/killSalome.py +++ b/bin/killSalome.py @@ -5,7 +5,7 @@ from killSalomeWithPort import killMyPort def killAllPorts(): user = os.getenv('USER') - for file in os.listdir("/tmp"): + for file in os.listdir(os.getenv("HOME")): l = string.split(file, "_") if len(l) >= 4: if file[:len(user)] == user: diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index f417c7a12..1ac458083 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -3,7 +3,7 @@ import os, sys, pickle, signal, commands ########## kills all salome processes with the given port ########## def killMyPort(port): - filedict='/tmp/'+os.getenv('USER')+"_"+port+'_SALOME_pidict' + filedict=os.getenv("HOME")+'/'+os.getenv('USER')+"_"+port+'_SALOME_pidict' found = 0 try: fpid=open(filedict, 'r') diff --git a/bin/runSalome.py b/bin/runSalome.py index 1797f9e36..36f2a6928 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -698,7 +698,7 @@ def useSalome(args, modules_list, modules_root_dir): # filedict = '/tmp/' + os.getenv('USER') + "_" + str(args['port']) \ # + '_' + args['appname'].upper() + '_pidict' # replaced args['appname'] by "SALOME" because in killSalome.py use of 'SALOME' in file name is hardcoded. - filedict = '/tmp/' + os.getenv('USER') + "_" + str(args['port']) \ + filedict = os.getenv("HOME") + '/' + os.getenv('USER') + "_" + str(args['port']) \ + '_' + 'SALOME' + '_pidict' process_ids = [] try: -- 2.39.2