#14055: Fix sage-cleaner
----------------------------------+-----------------------------------------
       Reporter:  jdemeyer        |         Owner:  leif                        
 
           Type:  defect          |        Status:  needs_review                
 
       Priority:  critical        |     Milestone:  sage-5.9                    
 
      Component:  scripts         |    Resolution:                              
 
       Keywords:  orphans         |   Work issues:                              
 
Report Upstream:  N/A             |     Reviewers:  John Palmieri, Leif 
Leonhardy
        Authors:  Jeroen Demeyer  |     Merged in:                              
 
   Dependencies:                  |      Stopgaps:                              
 
----------------------------------+-----------------------------------------

Comment (by leif):

 Replying to [comment:10 jhpalmieri]:
 > Maybe the problem is that `time.sleep(wait + 3)` used to be called
 before the first call to `cleanup()`, and now it's not. So now `cleanup()`
 can be called before any doctesting processes have started, so it returns
 zero, so sage-cleaner thinks there is nothing to be cleaned up and exits
 right away.
 > [...]
 > I don't know if the initial sleep should be for `wait` or a smaller
 number. Does it matter?

 I wouldn't rely on some wall time.

 Unfortunately the cleaner cannot `wait()` for its parent, but it could
 poll whether it is still running (or -- much better I think -- wait for
 another signal), and do nothing until its parent has "vanished"
 (terminated, and no other process with the same PID is meanwhile running
 -- that's also a potential, although probably unlikely, problem with left-
 over Sage cleaner and `spawned_processes` PID files; in the latter case,
 even unrelated processes of the same user could get killed.)

 If there's already another Sage cleaner instance running, it could of
 course exit immediately (modulo the problem mentioned before).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14055#comment:16>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to