Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: 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: 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/