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:
########## 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')
#print process_id
- filedict = '/tmp/' + os.getenv('USER') + "_" + str(args['port']) \
+ filedict = os.getenv("HOME") + '/' + os.getenv('USER') + "_" + str(args['port']) \
+ '_' + args['appname'].upper() + '_pidict'
process_ids = []