#5053: [with patch, needs review] If the hostname of the computer has a "-"  in
it, then no tempfiles will ever be deleted from $DOT_SAGE/temp!
---------------------+------------------------------------------------------
 Reporter:  was      |        Owner:  cwitty  
     Type:  defect   |       Status:  new     
 Priority:  blocker  |    Milestone:  sage-3.3
Component:  misc     |   Resolution:          
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by SimonKing):

  * summary:  [with patch, needs review] If the hostname of the computer
              has a "-" in it, then no tempfiles will ever be
              deleted from $DOT_SAGE/temp! => [with patch,
              needs review] If the hostname of the computer
              has a "-"  in it, then no tempfiles will ever
              be deleted from $DOT_SAGE/temp!

Comment:

 I had a short discussion with William:

 A related issue occurs when the hostname contains a slash '/'. Namely, the
 file name obtained from the hostname would be interpreted as a ''path''
 name, yielding an error! Again, a possible solution is to replace '/' by
 '_', both in `sage/misc/misc.py` and in the `sage-cleaner`. Since the
 reason is more or less the same, William suggested to discuss this on the
 same ticket.

 And similarly, there may be problems when the hostname contains a
 backslash '\'. So, I did the according replacement.

 There is only one situation in which this idea might be a problem:
  * There are two hosts whose names coincide after the replacements
  * These hosts share DOT_SAGE
  * By coincidence, two Sage processes running on these two hosts have the
 same `pid`.

 This situation would yield a collision, but it seems to be '''extremely
 unlikely'''.

 '''Conclusion'''
  There are hostnames containing a slash (I think I have seen one in
 nature...). So, in the current setting, a bug would occur. My patches (all
 three together) fix this bug.
  The price to pay is another bug that would occur in an extremely unlikely
 setting.

 I tested my patches with the hostnames `test-test_test`, `test/test` and
 `test\test`.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5053#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to