summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-24 17:13:16 +0000
committerChristopher Faylor <me@cgf.cx>2004-02-24 17:13:16 +0000
commit5dbaca1607d7650bfb3c8fe2766ad3aed044e0c1 (patch)
tree71e2d642b9e3fe2b44c3723eaf475dcfc36afdf6 /winsup/cygwin/dcrt0.cc
parent3d7e5e901fa246c919b4894cc2fa20750aba41f3 (diff)
downloadcygnal-5dbaca1607d7650bfb3c8fe2766ad3aed044e0c1.tar.gz
cygnal-5dbaca1607d7650bfb3c8fe2766ad3aed044e0c1.tar.bz2
cygnal-5dbaca1607d7650bfb3c8fe2766ad3aed044e0c1.zip
* dcrt0.cc (_dll_crt0): Add some stern internal errors.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 06982e653..eba2348be 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -910,12 +910,18 @@ extern "C" void __stdcall
_dll_crt0 ()
{
extern HANDLE sync_startup;
- if (sync_startup)
+ if (!sync_startup)
+ system_printf ("internal error: sync_startup not called at start. Expect signal problems.");
+ else
{
(void) WaitForSingleObject (sync_startup, INFINITE);
CloseHandle (sync_startup);
}
+ extern unsigned threadfunc_ix;
+ if (!threadfunc_ix)
+ system_printf ("internal error: couldn't determine location of thread function on stack. Expect signal problems.");
+
main_environ = user_data->envptr;
*main_environ = NULL;