From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Kettenis Newsgroups: gmane.comp.gdb.patches,gmane.lisp.guile.devel Subject: Re: [RFC] Block all async signals used by gdb when initializing Guile Date: Sat, 29 Aug 2015 23:04:02 +0200 (CEST) Message-ID: <201508292104.t7TL42OS020892@glazunov.sibelius.xs4all.nl> References: <831tel3o68.fsf@gnu.org> <83wpwd26lt.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1440882269 1963 80.91.229.3 (29 Aug 2015 21:04:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2015 21:04:29 +0000 (UTC) Cc: eliz@gnu.org, gdb-patches@sourceware.org, guile-devel@gnu.org To: xdje42@gmail.com Original-X-From: gdb-patches-return-125726-gdb-gdb-patches=m.gmane.org@sourceware.org Sat Aug 29 23:04:23 2015 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 1ZVnIR-0007VP-Ol for gdb-gdb-patches@plane.gmane.org; Sat, 29 Aug 2015 23:04:20 +0200 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:cc:in-reply-to:subject :references; q=dns; s=default; b=adpsSe4Ryabf7eBQ1xGDcD/6ScdKRfq IUHFtwAXe1ST/p/ro+HqXQ9uX4tFEZSb7Ww4YGbQ5OoOqQOOHLTi5T5MPJsyZNJ0 4Jd8Tkp6lDxWMSTDVXenGx5f/HbfhofVuBRBn/iBZLs1ygXpsDLOmRYTx30776a5 il3+aDXQqIxw= 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:date:message-id:from:to:cc:in-reply-to:subject :references; s=default; bh=Ea2m52unfejrbZMkVnKr/RLngs4=; b=a3Np4 l13NlgvN6VzwloElPmWGpFlSpvuVpo2x04B+MNtzWuPUVfo8OUThrJXbRRJQeBAJ lKHDuohv4HG4Bm6oYkw8Z1GUf6z9KTRpM/e/CCW2LONLVXDtPaUTx4XlOggN1C5r hflyQ2r6nrMuUQxlw0ki3dTSqsMSZL2YeOt/jg= Original-Received: (qmail 100224 invoked by alias); 29 Aug 2015 21:04:15 -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 100215 invoked by uid 89); 29 Aug 2015 21:04:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: sibelius.xs4all.nl Original-Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 29 Aug 2015 21:04:12 +0000 Original-Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by sibelius.xs4all.nl (8.14.5/8.14.5) with ESMTP id t7TL42Ju029683; Sat, 29 Aug 2015 23:04:02 +0200 (CEST) Original-Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id t7TL42OS020892; Sat, 29 Aug 2015 23:04:02 +0200 (CEST) In-reply-to: (message from Doug Evans on Sat, 29 Aug 2015 13:39:55 -0700) Xref: news.gmane.org gmane.comp.gdb.patches:110703 gmane.lisp.guile.devel:17800 Archived-At: > Date: Sat, 29 Aug 2015 13:39:55 -0700 > From: Doug Evans > > On Sat, Aug 29, 2015 at 1:16 PM, Eli Zaretskii wrote: > >> Date: Sat, 29 Aug 2015 12:20:24 -0700 > >> From: Doug Evans > >> Cc: "gdb-patches@sourceware.org" , guile-devel > >> > >> > What about platforms that don't have sigprocmask, but do have SIGINT? > >> > Don't we want to block SIGINT on those platforms? > >> > >> Do they have threads > > > > They might. (The only way I've succeeded to have a working Guile on > > Windows was to disable threads, but I hope that bug will be fixed one > > day.) > > > >> and how does one block SIGINT on those platforms? > > > > With a call to 'signal', I guess. > > I'm guessing that won't work here, we'll need something else. > The issue is we need the threads that guile starts > to have these signals blocked. Then after guile init > returns we unblock the signals. I suppose blocking these in the threads that guile starts is necessary because that is the only way to guarantee that those signals will be delivered to the main gdb thread on POSIX systems. On Windows you probably need to do something completely different.