diff options
author | Christopher Faylor <me@cgf.cx> | 2004-09-20 04:58:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-09-20 04:58:36 +0000 |
commit | e58412a2a028e269d8b5149aff8bc8520081d177 (patch) | |
tree | 589659393d9639bee278deb076c7986fde496e71 /winsup | |
parent | f777a1d0541bb3aa124f5a9261142beb3f155d26 (diff) | |
download | newlib-e58412a2a028e269d8b5149aff8bc8520081d177.zip newlib-e58412a2a028e269d8b5149aff8bc8520081d177.tar.gz newlib-e58412a2a028e269d8b5149aff8bc8520081d177.tar.bz2 |
* exceptions.cc (sig_handle_tty_stop): Set flag that we are in a cygwin
function to avoid a probably erroneous stack walk.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.cc | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b567cfa..7139729 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-09-20 Christopher Faylor <cgf@timesys.com> + + * exceptions.cc (sig_handle_tty_stop): Set flag that we are in a cygwin + function to avoid a probably erroneous stack walk. + 2004-09-17 Corinna Vinschen <corinna@vinschen.de> * syscalls.cc (unlink): Don't use "delete on close" on remote shares. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 1a065f7..7f76ad5 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -593,7 +593,7 @@ extern "C" { static void sig_handle_tty_stop (int sig) { - /* Silently ignore attempts to suspend if there is no accomodating + /* Silently ignore attempts to suspend if there is no accommodating cygwin parent to deal with this behavior. */ if (!myself->ppid_handle) { @@ -623,6 +623,7 @@ sig_handle_tty_stop (int sig) HANDLE w4[2]; w4[0] = sigCONT; w4[1] = signal_arrived; + _my_tls.incyg = 1; switch (WaitForMultipleObjects (2, w4, TRUE, INFINITE)) { case WAIT_OBJECT_0: @@ -633,6 +634,7 @@ sig_handle_tty_stop (int sig) api_fatal ("WaitSingleObject failed, %E"); break; } + _my_tls.incyg = 0; return; } } diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 2ab9769..416761e 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1182,6 +1182,8 @@ wait_sig (VOID *self) else { int sig = pack.si.si_signo; + // FIXME: Not quite right when taking threads into consideration. + // Do we need a per-thread queue? if (sigq.sigs[sig].si.si_signo) sigproc_printf ("sig %d already queued", pack.si.si_signo); else |