From 3eb92a58f851da461193a1bbb8b577868355cfb6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 23 Mar 2006 16:52:34 +0000 Subject: [PATCH] * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the console handler here. * dtable.cc (dtable::stdio_init): Initialize console handler here. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/dcrt0.cc | 1 - winsup/cygwin/dtable.cc | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8ec6f3e1f..2a727642c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2006-03-23 Christopher Faylor + + * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the + console handler here. + * dtable.cc (dtable::stdio_init): Initialize console handler here. + 2006-03-23 Christopher Faylor * sigproc.cc (sigalloc): Don't set SA_RESTART here. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 971954fb3..1df274c02 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -693,7 +693,6 @@ child_info_spawn::handle_spawn () old_title = strcpy (title_buf, moreinfo->old_title); cfree (moreinfo->old_title); } - init_console_handler (myself->ctty >= 0); } void __stdcall diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 8996e8587..74ce74b67 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -134,7 +134,10 @@ dtable::stdio_init () in case they're missed. */ if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT)) - return; + { + init_console_handler (myself->ctty >= 0); + return; + } HANDLE in = GetStdHandle (STD_INPUT_HANDLE); HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE); -- 2.43.5