diff options
author | Christopher Faylor <me@cgf.cx> | 2006-03-22 16:42:45 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-03-22 16:42:45 +0000 |
commit | 81010d21e6d40a76e9cdee849f21c90da5f54bec (patch) | |
tree | 8422d18565d56adbaea7d8d681957034bbb3b53d /winsup/cygwin/dcrt0.cc | |
parent | 69769b7cb50c9b0dc1f6921bc76b94a2558595ff (diff) | |
download | cygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.tar.gz cygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.tar.bz2 cygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.zip |
* fhandler.cc (fcntl): Print flags in hex.
* dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved pinfo_init
and uinfo_init here.
(dll_crt0_1): Ditto.
(__dll_crt0): Ditto. Don't call update_envptrs here.
(dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
* environ.cc (environ_init): Call it here instead.
* sigproc.cc (my_readsig): New static variable.
(wait_for_sigthread): Set up read pipe here since we are assured that we have
the proper privileges when this is called.
(talktome): Eliminate second argument since it is available as a global now.
(wait_sig): Reflect use of my_readsig.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 5f7f2708b..971954fb3 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -754,12 +754,6 @@ dll_crt0_0 () user_data->resourcelocks->Init (); user_data->threadinterface->Init (); - if (!in_forkee) - { - pinfo_init (envp, envc); - uinfo_init (); /* initialize user info */ - } - _cygtls::init (); /* Initialize events */ @@ -838,6 +832,7 @@ dll_crt0_1 (char *) fork_init (); } #endif + pinfo_init (envp, envc); /* Can be set only after environment has been initialized. */ if (wincap.has_security ()) @@ -849,6 +844,14 @@ dll_crt0_1 (char *) /* Allocate cygheap->fdtab */ dtable_init (); + uinfo_init (); /* initialize user info */ + + wait_for_sigthread (); + extern DWORD threadfunc_ix; + if (!threadfunc_ix) + system_printf ("internal error: couldn't determine location of thread function on stack. Expect signal problems."); + + /* Connect to tty. */ tty_init (); @@ -960,13 +963,7 @@ initialize_main_tls (char *padding) extern "C" void __stdcall _dll_crt0 () { - extern DWORD threadfunc_ix; - wait_for_sigthread (); - if (!threadfunc_ix) - system_printf ("internal error: couldn't determine location of thread function on stack. Expect signal problems."); - main_environ = user_data->envptr; - update_envptrs (); char padding[CYGTLS_PADSIZE]; |