This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Block all async signals used by gdb when initializing Guile
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: gdb-patches at sourceware dot org, guile-devel at gnu dot org
- Date: Sun, 30 Aug 2015 05:35:44 +0300
- Subject: Re: [RFC] Block all async signals used by gdb when initializing Guile
- Authentication-results: sourceware.org; auth=none
- References: <m3r3mmdn7g dot fsf at sspiff dot org> <831tel3o68 dot fsf at gnu dot org> <CAP9bCMQmWmbLg9qZ3ZyVyTF=fBOB-sJtFAr1=OCC_g53aGYRUw at mail dot gmail dot com> <83wpwd26lt dot fsf at gnu dot org> <CAP9bCMRh+y4aNzgOThff5syzGs5-i2XpcbLVYw5G1avgd4QVvA at mail dot gmail dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 29 Aug 2015 13:39:55 -0700
> From: Doug Evans <xdje42@gmail.com>
> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, guile-devel <guile-devel@gnu.org>
>
> On Sat, Aug 29, 2015 at 1:16 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> Date: Sat, 29 Aug 2015 12:20:24 -0700
> >> From: Doug Evans <xdje42@gmail.com>
> >> Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, guile-devel <guile-devel@gnu.org>
> >>
> >> > 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?