A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-August/127737.html below:

[Python-Dev] PEP 446: Open issues/questions

[Python-Dev] PEP 446: Open issues/questions [Python-Dev] PEP 446: Open issues/questionsRichard Oudkerk shibturn at gmail.com
Fri Aug 2 10:10:32 CEST 2013
On 02/08/2013 12:59am, Victor Stinner wrote:
> On Windows, a file cannot be removed if at least one process opened
> it. If you create a temporary file, run a program, and delete the
> temporary file: the deletion fails if the program inherited the file
> and the program is not done before the deletion. Is this correct?

It depends whether the handles use FILE_SHARE_DELETE.  The Python module 
tempfile uses the O_TEMPORARY flag which implies FILE_SHARE_DELETE. 
This means that the file *can* be deleted/moved while there are open 
handles.  Annoyingly the folder containing that file still cannot be 
deleted while there are open handles.

-- 
Richard

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4