summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/assert.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-07-04 15:25:36 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-07-04 15:25:36 +0000
commitfc3e7da6b07f70c4be4d75f79f92a306520b8a7f (patch)
treeca0e76bf5c25cc10d7af4a6c5834d19ad75b4fa9 /winsup/cygwin/assert.cc
parentd3ed549d518c216a42b43e20f224be5323ee66a8 (diff)
downloadcygnal-fc3e7da6b07f70c4be4d75f79f92a306520b8a7f.tar.gz
cygnal-fc3e7da6b07f70c4be4d75f79f92a306520b8a7f.tar.bz2
cygnal-fc3e7da6b07f70c4be4d75f79f92a306520b8a7f.zip
Throughout, open console handles with sharing for reading and writing.
* dcrt0.cc (insert_file): Open file with full sharing allowed. * hookapi.cc (find_first_notloaded_dll): Ditto. * spawn.cc (av::fixup): Ditto.
Diffstat (limited to 'winsup/cygwin/assert.cc')
-rw-r--r--winsup/cygwin/assert.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
index edd0ee7a6..c0550099e 100644
--- a/winsup/cygwin/assert.cc
+++ b/winsup/cygwin/assert.cc
@@ -33,8 +33,8 @@ __assert_func (const char *file, int line, const char *func,
/* If we don't have a console in a Windows program, then bring up a
message box for the assertion failure. */
- h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
+ &sec_none_nih, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE)
{
PWCHAR buf = (PWCHAR) alloca ((100 + strlen (failedexpr))