This patch suspends all threads on SIGSTOP and resumes them on SIGCONT. The corresponding functions in the pthread class are already committed.
Thomas
2003-10-31 Thomas Pfaff <[EMAIL PROTECTED]>
* exceptions.cc (sig_handle_tty_stop): Suspend all
threads on SIGSTOP, resume them on SIGCONT.? suspend_all_on_stop.patch
Index: exceptions.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/exceptions.cc,v
retrieving revision 1.172
diff -u -p -r1.172 exceptions.cc
--- exceptions.cc 14 Oct 2003 09:21:55 -0000 1.172
+++ exceptions.cc 31 Oct 2003 20:48:59 -0000
@@ -622,10 +622,12 @@ sig_handle_tty_stop (int sig)
if (ISSTATE (parent, PID_NOCLDSTOP))
sig_send (parent, SIGCHLD);
}
+ pthread::suspend_all_except_self ();
sigproc_printf ("process %d stopped by signal %d, myself->ppid_handle %p",
myself->pid, sig, myself->ppid_handle);
if (WaitForSingleObject (sigCONT, INFINITE) != WAIT_OBJECT_0)
api_fatal ("WaitSingleObject failed, %E");
+ pthread::resume_all ();
return;
}
}
