This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Ctrl-Z fails to suspend Windows programs
- From: "Dave Korn" <dk at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 16 Jun 2004 10:19:32 +0100
- Subject: RE: Ctrl-Z fails to suspend Windows programs
> -----Original Message-----
> From: cygwin-owner On Behalf Of Jani tiainen
> Sent: 16 June 2004 06:13
> To: cygwin
> Subject: Re: Ctrl-Z fails to suspend Windows programs
>
> Christopher Faylor wrote:
> > There is no way to reliably suspend a Windows programs.
>
> Yes there is ( piece of pseudo code):
>
> For Each Thread THREAD_Y in Process PROCESS_X
> Call_Win32API SuspendThread(THREAD_Y.Handle)
> Next
>
> NOTE: In Win2k and later you need THREAD_SUSPEND_RESUME rights for
> particular thread.
Arbitrarily suspending threads at random stages of execution can be very
bad news if they hold vital system locks....
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/