On Fri, Oct 31, 2003 at 10:17:37PM +0100, Thomas Pfaff wrote: >This time with attachment. > >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.
You can't suspend threads like this because SuspendThread can hang in some situations, like when a thread is doing I/O. That's why there is a WaitForSingleObject here rather than just suspending the thread. It is not a perfect solution, obviously but this will just cause people to complain about multi-threaded processes hanging after they hit CTRL-Z. cgf
