diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-13 18:29:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-13 18:29:48 +0000 |
commit | bbca1e4cb97050e1cc646730aedd8269f9474fc2 (patch) | |
tree | 1703fdf0f881af37489241232ddde413636be8da /winsup/cygwin/dcrt0.cc | |
parent | d6382e653ac71b77675d569c225640f5b2683058 (diff) | |
download | cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.tar.gz cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.tar.bz2 cygnal-bbca1e4cb97050e1cc646730aedd8269f9474fc2.zip |
* dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a little
later. Add a comment.
* fork.cc (resume_child): Make void.
(frok::parent): Only zero pi when necessary. Explicitly zero si. Set
this_errno when child_copy fails. Accommodate change to resume_child.
* sigproc.cc (sigalloc): Move global_sigs initialization here.
(sigproc_init): Move global_sigs.
(sig_send): Just check for flush signals once.
* wincap.h: Define supports_setconsolectrlhandler_null throughout.
* wincap.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 9da090f30..149d37794 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -671,6 +671,13 @@ void __stdcall dll_crt0_0 () { init_global_security (); + initial_env (); + + /* Initialize signal processing here, early, in the hopes that the creation + of a thread early in the process will cause more predictability in memory + layout for the main thread. */ + sigproc_init (); + lock_process::init (); init_console_handler (TRUE); _impure_ptr = _GLOBAL_REENT; @@ -680,7 +687,6 @@ dll_crt0_0 () _impure_ptr->_current_locale = "C"; user_data->impure_ptr = _impure_ptr; user_data->impure_ptr_ptr = &_impure_ptr; - initial_env (); mmap_init (); if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (), @@ -750,8 +756,6 @@ dll_crt0_0 () DuplicateTokenEx (hProcToken, MAXIMUM_ALLOWED, NULL, SecurityImpersonation, TokenImpersonation, &hProcImpToken); - /* Initialize signal/subprocess handling. */ - sigproc_init (); debug_printf ("finished dll_crt0_0 initialization"); } |