Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Dave Korn" <dk@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: Ctrl-Z fails to suspend Windows programs
Date: Wed, 16 Jun 2004 10:19:32 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
In-Reply-To: <40CFD6E5.1070709@luukku.com>
Message-ID: <NUTMEG3GaMJJ7SrF7aM000003b7@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 16 Jun 2004 09:19:32.0671 (UTC) FILETIME=[08CD4CF0:01C45383]

> -----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/

