Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-08-27 08:10:54 +0400
committerChristopher Faylor <me@cgf.cx>2002-08-27 08:10:54 +0400
commit6d8bd861e2503d0ab3c3cb64016b50700236265b (patch)
tree653c392b174694dbac0b9056e4d87a75a2e864e1 /winsup/cygwin/dcrt0.cc
parent4854ee501ebdb755be22392f8552a05284263a65 (diff)
* child_info.h: Add _PROC_WHOOPS enum value.
(CURR_CHILD_INFO_MAGIC): Update. (child_info::magic): Make 'long'. * cygheap.h: Export _cygheap_start. * cygheap.cc: Don't declare _cygheap_start. * cygmagic: Use cksum to produce checksums. Append 'U' to end of checksum. * dcrt0.cc (initial_env): Calculate sleep ms before reusing buffer. (_dll_crt0): Detect cygheap mismatch as indicative of different cygwin version. Set child_proc_info to NULL when _PROC_WHOOPS. (multiple_cygwin_problem): If child_info specific problem, then set child_proc_info type to _PROC_WHOOPS. * shared_info.h (CURR_MOUNT_MAGIC): Update. (CURR_SHARED_MAGIC): Ditto.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 0384275b3..003085dd1 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -796,10 +796,11 @@ initial_env ()
#ifdef DEBUGGING
if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf) - 1))
{
+ DWORD ms = atoi (buf);
buf[0] = '\0';
len = GetModuleFileName (NULL, buf, MAX_PATH);
- console_printf ("Sleeping %d, pid %u %s\n", atoi (buf), GetCurrentProcessId (), buf);
- Sleep (atoi (buf));
+ console_printf ("Sleeping %d, pid %u %s\n", ms, GetCurrentProcessId (), buf);
+ Sleep (ms);
}
if (GetEnvironmentVariable ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
{
@@ -872,7 +873,11 @@ _dll_crt0 ()
multiple_cygwin_problem ("proc", child_proc_info->intro, 0);
else if (child_proc_info->intro == PROC_MAGIC_GENERIC
&& child_proc_info->magic != CHILD_INFO_MAGIC)
- multiple_cygwin_problem ("proc", child_proc_info->magic, CHILD_INFO_MAGIC);
+ multiple_cygwin_problem ("proc", child_proc_info->magic,
+ CHILD_INFO_MAGIC);
+ else if (child_proc_info->cygheap != (void *) &_cygheap_start)
+ multiple_cygwin_problem ("cygheap", (DWORD) child_proc_info->cygheap,
+ (DWORD) &_cygheap_start);
unsigned should_be_cb = 0;
switch (child_proc_info->type)
{
@@ -896,6 +901,8 @@ _dll_crt0 ()
}
default:
system_printf ("unknown exec type %d", child_proc_info->type);
+ /* intentionally fall through */
+ case _PROC_WHOOPS:
child_proc_info = NULL;
break;
}
@@ -1071,9 +1078,9 @@ __api_fatal (const char *fmt, ...)
void
multiple_cygwin_problem (const char *what, unsigned magic_version, unsigned version)
{
- if (_cygwin_testing && strstr (what, "proc"))
+ if (_cygwin_testing && (strstr (what, "proc") || strstr (what, "cygheap")))
{
- fork_info = NULL;
+ child_proc_info->type = _PROC_WHOOPS;
return;
}