diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-16 02:57:37 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-16 02:57:37 +0000 |
commit | 974f27a51acaa16269541985e22ee7590ba49670 (patch) | |
tree | 88561981b54b1c8012c6b9ed255b54cffe78bef1 /winsup/cygwin/dcrt0.cc | |
parent | 490cfb83e99515e5b5573ab74d73f15c582da1b6 (diff) | |
download | cygnal-974f27a51acaa16269541985e22ee7590ba49670.tar.gz cygnal-974f27a51acaa16269541985e22ee7590ba49670.tar.bz2 cygnal-974f27a51acaa16269541985e22ee7590ba49670.zip |
* cygheap.cc (init_cygheap::manage_console_count): Turn console control handler
on/off depending on whether we have allocated a console or not.
* dcrt0.cc (child_info_fork::fork_retry): Add more potential retry statuses.
(dll_crt0_0): Turn on/off console control depending on whether we have a
controlling tty or not.
* exceptions.cc (init_console_handler): Change BOOL to bool.
* fhandler_console.cc (fhandler_console::need_invisible): Cosmetic change.
* winsup.h (init_console_handler): Reflect argument type change.
* wincap.h (supports_setconsolectrlhandler_null): Remove duplicate capability
throughout.
* wincap.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 26a749c0a..c309fb36c 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -651,9 +651,8 @@ child_info_fork::fork_retry (HANDLE h) switch (exit_code) { case STATUS_CONTROL_C_EXIT: - if (retry-- > 0) - return 0; - break; + case STATUS_DLL_INIT_FAILED: + case STATUS_DLL_INIT_FAILED_LOGOFF: case EXITCODE_RETRY: if (retry-- > 0) return 0; @@ -709,7 +708,6 @@ dll_crt0_0 () sigproc_init (); lock_process::init (); - init_console_handler (TRUE); _impure_ptr = _GLOBAL_REENT; _impure_ptr->_stdin = &_impure_ptr->__sf[0]; _impure_ptr->_stdout = &_impure_ptr->__sf[1]; @@ -736,7 +734,10 @@ dll_crt0_0 () child_proc_info = get_cygwin_startup_info (); if (!child_proc_info) - memory_init (); + { + memory_init (); + init_console_handler (myself->ctty >= 0); + } else { cygwin_user_h = child_proc_info->user_h; @@ -772,6 +773,7 @@ dll_crt0_0 () } break; } + init_console_handler (myself->ctty >= 0); } user_data->resourcelocks->Init (); @@ -782,6 +784,7 @@ dll_crt0_0 () pinfo_init (envp, envc); uinfo_init (); /* initialize user info */ } + _cygtls::init (); /* Initialize events */ |