Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Does the module provide a way to close the file? Commented Jun 30, 2015 at 21:23
  • 2
    You can't without access to the file handle black_box generates. Commented Jun 30, 2015 at 21:23
  • 1
    You need to kill the process which is using the file. Commented Jun 30, 2015 at 21:38
  • In Windows the intention to allow deleting has to be made clear when a handle to a file or directory is opened. Specifically, DeleteFile tries to open a handle that shares delete access, which fails if previously opened handles don't share delete access. You could use undocumented system calls to list file handles in a process and then close handles to the particular file, but then the black_box module might crash when it attempts to use the closed handle.
    – Eryk Sun
    Commented Jul 1, 2015 at 1:31