From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.devel,gmane.comp.gdb.patches Subject: Re: [RFC] Block all async signals used by gdb when initializing Guile Date: Sun, 30 Aug 2015 05:35:44 +0300 Message-ID: <83twrh1p1b.fsf@gnu.org> References: <831tel3o68.fsf@gnu.org> <83wpwd26lt.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1440902159 12345 80.91.229.3 (30 Aug 2015 02:35:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2015 02:35:59 +0000 (UTC) Cc: guile-devel@gnu.org, gdb-patches@sourceware.org To: Doug Evans Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Aug 30 04:35:50 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZVsTF-00052V-8a for guile-devel@m.gmane.org; Sun, 30 Aug 2015 04:35:49 +0200 Original-Received: from localhost ([::1]:56062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVsTF-0007Qd-0T for guile-devel@m.gmane.org; Sat, 29 Aug 2015 22:35:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVsTB-0007Ph-0c for guile-devel@gnu.org; Sat, 29 Aug 2015 22:35:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVsT6-0002Od-1b for guile-devel@gnu.org; Sat, 29 Aug 2015 22:35:44 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:43118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVsT5-0002OJ-Pf for guile-devel@gnu.org; Sat, 29 Aug 2015 22:35:39 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NTV00600IOIFJ00@a-mtaout21.012.net.il> for guile-devel@gnu.org; Sun, 30 Aug 2015 05:35:38 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NTV0063WJ7DEN10@a-mtaout21.012.net.il>; Sun, 30 Aug 2015 05:35:38 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17801 gmane.comp.gdb.patches:110714 Archived-At: > Date: Sat, 29 Aug 2015 13:39:55 -0700 > From: Doug Evans > Cc: "gdb-patches@sourceware.org" , guile-devel > > 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. I don't understand why. Can you explain? Maybe I'm missing something. > The issue is we need the threads that guile starts > to have these signals blocked. Then after guile init > returns we unblock the signals. Inhibit SIGINT ech time before calling Guile and restore it after Guile returns. Wouldn't that do what you want?