From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Evans Newsgroups: gmane.comp.gdb.patches,gmane.lisp.guile.devel Subject: Re: [PATCH v2] Improved ^c support for gdb/guile Date: Mon, 17 Feb 2014 16:37:30 -0800 Message-ID: References: <834n3x8o7m.fsf@gnu.org> <83y519788a.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1392683853 2698 80.91.229.3 (18 Feb 2014 00:37:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 00:37:33 +0000 (UTC) Cc: "gdb-patches@sourceware.org" , guile-devel@gnu.org To: Eli Zaretskii Original-X-From: gdb-patches-return-110456-gdb-gdb-patches=m.gmane.org@sourceware.org Tue Feb 18 01:37:42 2014 Return-path: Envelope-to: gdb-gdb-patches@plane.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WFYgs-00065p-8z for gdb-gdb-patches@plane.gmane.org; Tue, 18 Feb 2014 01:37:38 +0100 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; q=dns; s=default; b= jHZhVl8w2JLvJIQAN2GQoSnk5PU4VEj3YJhB0pmSInb/OAS0HOSWZZeenNEPFa7f HZgcyxaZ+0n2hJvUyAeahuAJCF1Jv5DpSIUzthoezn3h0G7Wp36uD8gb5r543Dg+ 8Y9NqGeQPWvVpXyUEIxEUKAvtGmuvzEzQvjbq/mTdHg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; s=default; bh=L/0Uu gD45qe8B7N5lClPs0nfSk8=; b=paVahaBS7PHZhARcFbUawK3Ivs2ashaRJ+XOO 2Wb9xeJtBVZaert5xlfHjdCimpQICKt5y64DV5U/nRq2gHN9FIeKKWFglfkaIWk5 feKrG+J0x0Ra6IM3M8OXauX7DbQv468TpyY0w56Er1UMlc47ZqpbvyVMWHAd2fRU BbOFoY= Original-Received: (qmail 22909 invoked by alias); 18 Feb 2014 00:37:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: gdb-patches-owner@sourceware.org Original-Received: (qmail 22899 invoked by uid 89); 18 Feb 2014 00:37:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f169.google.com Original-Received: from mail-yk0-f169.google.com (HELO mail-yk0-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 18 Feb 2014 00:37:33 +0000 Original-Received: by mail-yk0-f169.google.com with SMTP id 142so31519876ykq.0 for ; Mon, 17 Feb 2014 16:37:31 -0800 (PST) X-Received: by 10.236.99.38 with SMTP id w26mr15381954yhf.18.1392683850899; Mon, 17 Feb 2014 16:37:30 -0800 (PST) Original-Received: by 10.170.130.14 with HTTP; Mon, 17 Feb 2014 16:37:30 -0800 (PST) In-Reply-To: <83y519788a.fsf@gnu.org> X-IsSubscribed: yes Xref: news.gmane.org gmane.comp.gdb.patches:95458 gmane.lisp.guile.devel:16878 Archived-At: On Mon, Feb 17, 2014 at 1:13 PM, Eli Zaretskii wrote: >> Date: Mon, 17 Feb 2014 12:59:22 -0800 >> From: Doug Evans >> Cc: "gdb-patches@sourceware.org" , guile-devel@gnu.org >> >> >> +void >> >> +gdbscm_initialize_sigint (void) >> >> +{ >> >> + siscm_sigint_pipe[0] = siscm_sigint_pipe[1] = -1; >> >> + >> >> + if (!SCM_USE_PTHREAD_THREADS) >> >> + { >> >> + warning (_("Guile does not have pthreads support.")); >> >> + warning (_("Proper SIGINT handling for Guile will be unavailable.")); >> >> + return; >> >> + } >> > >> > The above is what worries me. Guile currently doesn't work in the >> > native MinGW build if configured with threads (it crashes, hangs, >> > etc.). Can't we have decent SIGINT handling without pthreads? >> >> With 2.0.x, no. >> I'm ok with changing the warning, e.g., not printing it at all on >> systems where it would otherwise always be printed, and instead >> documenting the issue for such systems. >> >> The downside is that while Scheme code is running SIGINT is ignored >> (unless one is in the repl, or sets up a SIGINT handler oneself). > > Ignored why? because GDB sets the handler to SIG_IGN? Or for some > other reason? A better way to phrase that is the SIGINT is deferred until the call out to Guile returns. Why? Because Guile's SIGINT handling in 2.0.x requires a separate thread: that's how all async signals are handled in Guile. ref: guile-2.0.9/libguile/scmsigs.c I'll let guile-devel take over at this point - I understand the code, but may miss something noteworthy. There is code in scmsigs.c to handle the non-pthread case but it's not clear how much is exported nor how well it works.