[prev in list] [next in list] [prev in thread] [next in thread]
List: cygwin-patches
Subject: Re: [PATCH] suspend all thread on SIGSTOP
From: Christopher Faylor <cgf () redhat ! com>
Date: 2003-10-31 21:26:56
[Download RAW message or body]
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 <tpfaff@gmx.net>
>
> * 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic