On Jan 15, 2009, at 22:58 , mabshoff wrote:

>
>
>
> On Jan 15, 10:52 pm, "Justin C. Walker" <[email protected]> wrote:
>> On Jan 15, 2009, at 19:52 , William Stein wrote:
>
> <SNIP>
>
> Hi,
>
>> If the temp files are truly temp files (i.e., not of interest when  
>> the
>> process that creates them exits), then there are Python calls that
>> help: the temp files can be created and unlinked, so that at exit,
>> they vanish.  In fact, they are not visible in the file system at  
>> all.
>
> Do you mean this?
>
> "os.tmpfile()
> Return a new file object opened in update mode (w+b). The file has no
> directory entries associated with it and will be automatically deleted
> once there are no file descriptors for the file. Availability: Unix,
> Windows"
>
> I don't see how this will work when I run "kill -9 $SOME_PID"

It works because there are no directory entries for it.  It is just  
held open by a file descriptor in the kernel.  When the process exits,  
the link count goes to zero (virtually), and the file structure [which  
is on-disk, but not represented in any directory on-disk] is deleted.   
Pas problem.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
   when you don't get what you want.
--------




--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to