Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-07-04 19:25:36 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-07-04 19:25:36 +0400
commitfc3e7da6b07f70c4be4d75f79f92a306520b8a7f (patch)
treeca0e76bf5c25cc10d7af4a6c5834d19ad75b4fa9 /winsup/cygwin/fork.cc
parentd3ed549d518c216a42b43e20f224be5323ee66a8 (diff)
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/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 97364e384..23a319b8f 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -324,9 +324,9 @@ frok::parent (volatile char * volatile stack_here)
/* If we don't have a console, then don't create a console for the
child either. */
HANDLE console_handle = CreateFile ("CONOUT$", GENERIC_WRITE,
- FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
- NULL);
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ &sec_none_nih, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, NULL);
if (console_handle != INVALID_HANDLE_VALUE)
CloseHandle (console_handle);