title: Will we ever be able to delete an open file in Windows?
body: <p>Disclaimer: I am mainly a linux/web developer.</p>
  
  <p>Windows has this "nice" feature where it denies permission to delete any file that is held open by any process. So if an antivirus hits the wrong file at the wrong time, some random program might misbehave and possibly crash.</p>
  
  <p>Am I right? Are there plans to fix this?</p>
  
  <p>Do any of you find this acceptable, or, how could it possibly seem a good idea at the time?</p>
  
  <p>Edit:</p>
  
  <p>It works very differently on Unix, and has been so for decades.</p>
  
  <p>As an example:</p>
  
  <ul>
  <li>process 1 opens foo.txt, for read or write, or both, doesn't matter</li>
  <li>process 2 deletes the file</li>
  <li>the file is unlinked from the filesystem</li>
  <li>process 1 keeps reading and/or writing, the file still exists, and it can grow as long as there's room on the disk. It's just not reachable from other processes that have not already a file handle to it.</li>
  <li>when process 1 closes the file, it won't be accessible from anywhere</li>
  </ul>
  
  <p>Actually, a common usage pattern for temporary files on Unix is: open-remove-read/write-close.</p>