From 426a5e21ab8306517ecd6d73f253d8dc13e39925 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Mon, 22 Feb 2010 14:17:34 -0800 Subject: Windows: Open files with FILE_SHARE_DELETE to get closer to UNIX semantics See dwShareMode on http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx --- erts/emulator/drivers/win32/win_efile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/emulator/drivers') diff --git a/erts/emulator/drivers/win32/win_efile.c b/erts/emulator/drivers/win32/win_efile.c index d5f2b79706..24b6fb30dc 100644 --- a/erts/emulator/drivers/win32/win_efile.c +++ b/erts/emulator/drivers/win32/win_efile.c @@ -689,7 +689,8 @@ Sint64* pSize; /* Where to store the size of the file. */ if (flags & EFILE_MODE_APPEND) { crFlags = OPEN_ALWAYS; } - fd = CreateFile(name, access, FILE_SHARE_READ | FILE_SHARE_WRITE, + fd = CreateFile(name, access, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, crFlags, FILE_ATTRIBUTE_NORMAL, NULL); /* -- cgit v1.2.3