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
6ab2d284e5
commit
6c1552b0da
|
@ -902,7 +902,9 @@ sig_handle_tty_stop (int sig, siginfo_t *, void *)
|
|||
thread. */
|
||||
/* Use special cygwait parameter to handle SIGCONT. _main_tls.sig will
|
||||
be cleared under lock when SIGCONT is detected. */
|
||||
pthread::suspend_all_except_self ();
|
||||
DWORD res = cygwait (NULL, cw_infinite, cw_sig_cont);
|
||||
pthread::resume_all ();
|
||||
switch (res)
|
||||
{
|
||||
case WAIT_SIGNALED:
|
||||
|
|
Loading…
Reference in New Issue