* fork.cc (fork_child): Invert sense of test which defeated correct handling in
a fork from a non-main thread. * dcrt0.cc (initial_env): Eliminate parameter and just send DebugBreak when appropriate. (dll_crt0_0): Reflect parameter change to initial_env. (dll_crt0_1): Don't call initial_env.
This commit is contained in:
parent
2d6c4a1a65
commit
0e061ecf96
|
@ -1,3 +1,13 @@
|
||||||
|
2004-02-18 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fork.cc (fork_child): Invert sense of test which defeated correct
|
||||||
|
handling in a fork from a non-main thread.
|
||||||
|
|
||||||
|
* dcrt0.cc (initial_env): Eliminate parameter and just send DebugBreak
|
||||||
|
when appropriate.
|
||||||
|
(dll_crt0_0): Reflect parameter change to initial_env.
|
||||||
|
(dll_crt0_1): Don't call initial_env.
|
||||||
|
|
||||||
2004-02-18 Christopher Faylor <cgf@redhat.com>
|
2004-02-18 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* gendef (stabilize_sig_stack): New function.
|
* gendef (stabilize_sig_stack): New function.
|
||||||
|
|
|
@ -536,25 +536,15 @@ break_here ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
initial_env (bool first)
|
initial_env ()
|
||||||
{
|
{
|
||||||
char buf[CYG_MAX_PATH + 1];
|
char buf[CYG_MAX_PATH + 1];
|
||||||
if (!first)
|
if (GetEnvironmentVariable ("CYGWIN_TESTING", buf, sizeof (buf) - 1))
|
||||||
/* nothing */;
|
|
||||||
else if (GetEnvironmentVariable ("CYGWIN_TESTING", buf, sizeof (buf) - 1))
|
|
||||||
_cygwin_testing = 1;
|
_cygwin_testing = 1;
|
||||||
|
|
||||||
#ifdef DEBUGGING
|
#ifdef DEBUGGING
|
||||||
DWORD len;
|
DWORD len;
|
||||||
static bool NO_COPY did_debugging_stuff;
|
|
||||||
#if 0
|
|
||||||
if (did_debugging_stuff || (first && wincap.cant_debug_dll_entry ()))
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
if (first)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
did_debugging_stuff = true;
|
|
||||||
if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf) - 1))
|
if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf) - 1))
|
||||||
{
|
{
|
||||||
DWORD ms = atoi (buf);
|
DWORD ms = atoi (buf);
|
||||||
|
@ -583,6 +573,8 @@ initial_env (bool first)
|
||||||
{
|
{
|
||||||
error_start_init (p);
|
error_start_init (p);
|
||||||
try_to_debug ();
|
try_to_debug ();
|
||||||
|
console_printf ("*** Sending Break. gdb may issue spurious SIGTRAP message.\n");
|
||||||
|
DebugBreak ();
|
||||||
break_here ();
|
break_here ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,7 +586,7 @@ void __stdcall
|
||||||
dll_crt0_0 ()
|
dll_crt0_0 ()
|
||||||
{
|
{
|
||||||
wincap.init ();
|
wincap.init ();
|
||||||
initial_env (true);
|
initial_env ();
|
||||||
|
|
||||||
char zeros[sizeof (child_proc_info->zero)] = {0};
|
char zeros[sizeof (child_proc_info->zero)] = {0};
|
||||||
|
|
||||||
|
@ -736,7 +728,6 @@ dll_crt0_1 (char *)
|
||||||
/* FIXME: Verify forked children get their exception handler set up ok. */
|
/* FIXME: Verify forked children get their exception handler set up ok. */
|
||||||
exception_list cygwin_except_entry;
|
exception_list cygwin_except_entry;
|
||||||
|
|
||||||
initial_env (false);
|
|
||||||
check_sanity_and_sync (user_data);
|
check_sanity_and_sync (user_data);
|
||||||
malloc_init ();
|
malloc_init ();
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
|
||||||
/* If we've played with the stack, stacksize != 0. That means that
|
/* If we've played with the stack, stacksize != 0. That means that
|
||||||
fork() was invoked from other than the main thread. Make sure that
|
fork() was invoked from other than the main thread. Make sure that
|
||||||
the threadinfo information is properly set up. */
|
the threadinfo information is properly set up. */
|
||||||
if (!fork_info->stacksize)
|
if (fork_info->stacksize)
|
||||||
{
|
{
|
||||||
_main_tls = &_my_tls;
|
_main_tls = &_my_tls;
|
||||||
_main_tls->init_thread (NULL, NULL);
|
_main_tls->init_thread (NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue