Fix dangling handles resulting from actively closing a file.
This commit is contained in:
parent
546f8f8445
commit
b09d15d503
3 changed files with 52 additions and 15 deletions
|
@ -371,6 +371,14 @@ interface EventDriverFiles {
|
|||
@safe: /*@nogc:*/ nothrow:
|
||||
FileFD open(string path, FileOpenMode mode);
|
||||
FileFD adopt(int system_file_handle);
|
||||
|
||||
/** Disallows any reads/writes and removes any exclusive locks.
|
||||
|
||||
Note that this function may not actually close the file handle. The
|
||||
handle is only guaranteed to be closed one the reference count drops
|
||||
to zero. However, the remaining effects of calling this function will
|
||||
be similar to actually closing the file.
|
||||
*/
|
||||
void close(FileFD file);
|
||||
|
||||
ulong getSize(FileFD file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue