From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9222 invoked by alias); 21 Aug 2007 03:22:24 -0000 Received: (qmail 9039 invoked by uid 22791); 21 Aug 2007 03:22:23 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Aug 2007 03:22:13 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-100-183.inter.net.il [80.230.100.183]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id IRQ94148 (AUTH halo1); Tue, 21 Aug 2007 06:21:58 +0300 (IDT) Date: Tue, 21 Aug 2007 03:22:00 -0000 Message-Id: From: Eli Zaretskii To: Daniel Jacobowitz CC: Roland.Puntaier@br-automation.com, gdb@sourceware.org In-reply-to: <20070820193128.GA17272@caradoc.them.org> (message from Daniel Jacobowitz on Mon, 20 Aug 2007 15:31:28 -0400) Subject: Re: gdb-6.6 mingw port hangs after Ctrl-C Reply-to: Eli Zaretskii References: <20070820162439.GA30242@caradoc.them.org> <20070820193128.GA17272@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00147.txt.bz2 > Date: Mon, 20 Aug 2007 15:31:28 -0400 > From: Daniel Jacobowitz > Cc: Roland.Puntaier@br-automation.com, gdb@sourceware.org > > On Mon, Aug 20, 2007 at 10:16:12PM +0300, Eli Zaretskii wrote: > > The way to fix this is to make the signal handler stop the main thread > > as the first thing it does. Then you have a Posix-compliant program > > again. I did something similar for the MinGW port of GNU Make. > > Is there any way to force the other thread to longjmp? Otherwise, > just stopping it isn't enough - you don't have the right stack. longjmp should (theoretically) handle this allright. But if not, you could raise a flag in the signal handler, then resume the main thread and return, and the main thread could check the flag and longjmp.