[Lldb-commits] [PATCH] D17107: [lldb] Unicode support on Win32
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 7 11:45:17 PST 2016
zturner added inline comments.
================
Comment at: lldb/trunk/source/Host/common/File.cpp:330
@@ +329,3 @@
+ }
+ ::_wsopen_s(&m_descriptor, wpath.c_str(), oflag, _SH_DENYWR, mode);
+#else
----------------
cameron314 wrote:
> zturner wrote:
> > Any particular reason you're using `_SH_DENYWR` instead of `_SH_DENYNO`? No matter what we do we will always have subtle differences in semantics, but `_SH_DENYNO` is closer to posix semantics.
> No particular reason other than I find `_SH_DENYWR` a reasonable default. It generally doesn't hurt to let others read the file while it's being written, and that's sometimes crucial (e.g. for log files which are written to incrementally and only closed at the very end). I can change it if you prefer.
I like deny write in principle as well, but I kind of do prefer to change it if for no other reason than it matches the semantics on Posix more closely. We've had sharing access denied errors in the past on Windows that we traced back to sharing violations, and it's easier if all platforms just use the same semantics.
http://reviews.llvm.org/D17107
More information about the lldb-commits
mailing list