From fc3e7da6b07f70c4be4d75f79f92a306520b8a7f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 4 Jul 2011 15:25:36 +0000 Subject: 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. --- winsup/cygwin/fork.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fork.cc') 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); -- cgit v1.2.3