mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 04:20:28 +08:00
Cygwin: exceptions.cc: Suspend all threads in sig_handle_tty_stop().
- Currently, thread created by pthread_create() is not suspended by the signal SIGTSTP. For example, even if a process with a thread is suspended by Ctrl-Z, the thread continues running. This patch fixes the issue.
This commit is contained in:
parent
e78f097efd
commit
62334dffd7
@ -902,7 +902,9 @@ sig_handle_tty_stop (int sig, siginfo_t *, void *)
|
|||||||
thread. */
|
thread. */
|
||||||
/* Use special cygwait parameter to handle SIGCONT. _main_tls.sig will
|
/* Use special cygwait parameter to handle SIGCONT. _main_tls.sig will
|
||||||
be cleared under lock when SIGCONT is detected. */
|
be cleared under lock when SIGCONT is detected. */
|
||||||
|
pthread::suspend_all_except_self ();
|
||||||
DWORD res = cygwait (NULL, cw_infinite, cw_sig_cont);
|
DWORD res = cygwait (NULL, cw_infinite, cw_sig_cont);
|
||||||
|
pthread::resume_all ();
|
||||||
switch (res)
|
switch (res)
|
||||||
{
|
{
|
||||||
case WAIT_SIGNALED:
|
case WAIT_SIGNALED:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user