X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 11 Jan 2009 13:07:40 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Signal handling in Win32 GUI programs Message-ID: <20090111180740.GC10049@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <496A1DBC DOT 7070004 AT gmail DOT com> <20090111163729 DOT GB9992 AT ednor DOT casa DOT cgf DOT cx> <496A24DE DOT 1080101 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <496A24DE.1080101@gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Note-from-DJ: This may be spam On Sun, Jan 11, 2009 at 04:57:02PM +0000, Andy Koppe wrote: > Christopher Faylor wrote: >> I don't know if this is what you are seeing but If you are blocked in a >> Windows function like WaitMessage or WaitForSingleObject, the signal >> will not be delivered until some random time after you leave the >> function. > > Alright, that's what it is then. > >> One way around this is to start a thread and wait for signals in that >> thread. > > I've added a thread doing 'for (;;) pause();', but unfortunately that > doesn't seem to do the trick. Do I need to go into Cygwin internals and > wait directly on the Win32 event(s) used for signals? sigwait() will probably work better than pause. cgf -- 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/