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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to