#15457: sage-cleaner does not quit
-------------------------------------+-------------------------------------
       Reporter:  vbraun             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.1
      Component:  scripts            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Volker Braun       |    Reviewers:  Jeroen Demeyer
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/ticket/15457            |  7a16247bf02e94e1522e8728894082cee8c825b5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vbraun):

 IMHO it is bad to keep log files open for extended amounts of time. This
 is just going to cause problems (depending on the file system) if multiple
 processes try do do that. And before you say that there is only one
 cleaner process, the whole point of the logging is to have a log to prove
 that if things go south again. The Python logging module does not support
 multiple processes logging to the same file, for the record. But at least
 it flushes the output.

 The `open(pidfile,'w').write(str(os.getpid()))` construct works but is
 IMHO bad style. For starters, it does an implicit close (explicit is
 better than implicit). The point in the program flow where the close
 occurs is also not specified (CPython implementation detail closes it
 immediately, I think, but the specs don't specify). And until the close
 there is (probably, again implementation/fs detail) nothing written to
 disk.

--
Ticket URL: <http://trac.sagemath.org/ticket/15457#comment:17>
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to