# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1351964647 3600
# Node ID 839f01c5a3635b7dbba19d87bae9f053b92b6f10
# Parent a8a59813314c013aa62496c2b325a1ea57f58487
Correct temporary directory in sagecleaner
diff git a/sagecleaner b/sagecleaner
a

b


3  3  ######################################################### 
4  4  # This is the sage monitor *daemon*, which cleans up after SAGE. 
5  5  # Some things that it cleans up: 
6   # * $HOME/.sage/temp/pid directories 
 6  # * $HOME/.sage/tmp/pid directories 
7  7  # * Processes that SAGE spawns. If a copy of SAGE isn't 
8  8  # running, then any process it spawned should have its 
9  9  # process group killed 
… 
… 

23  23  HOSTNAME = socket.gethostname().replace('','_').replace('/','_').replace('\\','_') 
24  24  
25  25  DOT_SAGE = os.environ['DOT_SAGE'] 
26   tmp = '%s/temp/%s/'%(DOT_SAGE, HOSTNAME) 
 26  tmp = os.path.join(DOT_SAGE, 'tmp', HOSTNAME) 
27  27  try: 
28  28  os.makedirs(tmp) 
29  29  except OSError: 
… 
… 

87  87  # try again later 
88  88  killed_them_all = False 
89  89  return killed_them_all 
90   
91   
92  90  
93  91  
94   pidfile = '%s/temp/cleaner%s.pid'%(DOT_SAGE, HOSTNAME) 
 92  pidfile = os.path.join(DOT_SAGE, 'tmp', 'cleaner%s.pid'%HOSTNAME) 
95  93  def setup_daemon(): 
96  94  if os.path.exists(pidfile): 
97  95  pid = open(pidfile).read() 