diff options
author | Erlang/OTP <[email protected]> | 2010-06-07 14:24:46 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-07 14:24:46 +0000 |
commit | 3e97f3dc6ad63707d283e7b9924df5cc8eb13a84 (patch) | |
tree | 0e66d4f9eeb04605fde8089332bd38aed8fdc653 /erts/emulator/drivers/unix | |
parent | 4f63a79d28435659af11fa94ed93f670a6759f4a (diff) | |
parent | bac96ae5bb5bfaa0c160a603c6db01dbcd7c83df (diff) | |
download | otp-3e97f3dc6ad63707d283e7b9924df5cc8eb13a84.tar.gz otp-3e97f3dc6ad63707d283e7b9924df5cc8eb13a84.tar.bz2 otp-3e97f3dc6ad63707d283e7b9924df5cc8eb13a84.zip |
Merge branch 'ms/file-exclusive-mode' into dev
* ms/file-exclusive-mode:
Update preloaded modules
Support opening files in exclusive mode
OTP-8670 ms/file-exclusive-mode
There is a new option 'exclusive' to file:open/2 that uses the OS O_EXCL
flag where supported to open the file in exclusive mode.
Diffstat (limited to 'erts/emulator/drivers/unix')
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index ea016526ef..0052ac0739 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -706,6 +706,9 @@ efile_openfile(Efile_error* errInfo, /* Where to return error codes. */ #endif } + if (flags & EFILE_MODE_EXCL) { + mode |= O_EXCL; + } #ifdef VXWORKS if (*name != '/') { |