summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dll_init.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-12-08 06:17:49 +0000
committerChristopher Faylor <me@cgf.cx>2011-12-08 06:17:49 +0000
commit5025bf330bc3d26e93f52e59a9d2df6b08ee816a (patch)
treee70fbbe8f84c8a4c5cee711e2dfab6890c0e9fd0 /winsup/cygwin/dll_init.cc
parent069e637c0e979de8dadf9627a1a7c6a63b464513 (diff)
downloadcygnal-5025bf330bc3d26e93f52e59a9d2df6b08ee816a.tar.gz
cygnal-5025bf330bc3d26e93f52e59a9d2df6b08ee816a.tar.bz2
cygnal-5025bf330bc3d26e93f52e59a9d2df6b08ee816a.zip
* dll_init.cc (dll_dllcrt0): Don't try to initialize dll data if we're
dynamically loaded since fork() doesn't work in that scenario anyway. (dll_dllcrt0_1): Don't accommodate dynamically loaded dlls. * exceptions.cc (ctrl_c_handler): Don't lock the process; there's too much risk of deadlock. * sigproc.cc (_cygtls::remove_wq): Don't try to remove anything from the waitq if there is obviously nothing there. * strace.cc (strace::activate): Allow stracing dynamically loaded cygwin1.dll.
Diffstat (limited to 'winsup/cygwin/dll_init.cc')
-rw-r--r--winsup/cygwin/dll_init.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index 12896e2ef..8a72ecee6 100644
--- a/winsup/cygwin/dll_init.cc
+++ b/winsup/cygwin/dll_init.cc
@@ -546,12 +546,10 @@ struct dllcrt0_info
extern "C" int
dll_dllcrt0 (HMODULE h, per_process *p)
{
+ if (dynamically_loaded)
+ return 1;
dllcrt0_info x (h, p);
-
- if (_my_tls.isinitialized ())
- dll_dllcrt0_1 (&x);
- else
- _my_tls.call ((DWORD (*) (void *, void *)) dll_dllcrt0_1, &x);
+ dll_dllcrt0_1 (&x);
return x.res;
}
@@ -592,11 +590,7 @@ dll_dllcrt0_1 (VOID *x)
However, that's just a note for the record; at the moment, we can't
see any need to worry about this happening. */
- /* Partially initialize Cygwin guts for non-cygwin apps. */
- if (dynamically_loaded && user_data->magic_biscuit == 0)
- dll_crt0 (p);
- else
- check_sanity_and_sync (p);
+ check_sanity_and_sync (p);
dll_type type;