aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorJan Lehnardt <[email protected]>2010-02-22 14:17:34 -0800
committerRaimo Niskanen <[email protected]>2010-06-02 12:03:16 +0200
commit426a5e21ab8306517ecd6d73f253d8dc13e39925 (patch)
treee498fabd01c38715e4d79e4b4ce30074c60c0c36 /erts
parente2d2e03227b6e910ba4f8ba5a16e5a8bb2a3d38e (diff)
downloadotp-426a5e21ab8306517ecd6d73f253d8dc13e39925.tar.gz
otp-426a5e21ab8306517ecd6d73f253d8dc13e39925.tar.bz2
otp-426a5e21ab8306517ecd6d73f253d8dc13e39925.zip
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
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/drivers/win32/win_efile.c3
1 files changed, 2 insertions, 1 deletions
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);
/*