unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-devel <guile-devel@gnu.org>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: [RFC] Block all async signals used by gdb when initializing Guile
Date: Mon, 31 Aug 2015 22:05:59 -0700	[thread overview]
Message-ID: <CAP9bCMSC3-NKPptfdisum8Au50yF_LbFb9e2sP6jfGxNPOZSDA@mail.gmail.com> (raw)
In-Reply-To: <83si711oyo.fsf@gnu.org>

On Sat, Aug 29, 2015 at 7:37 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sat, 29 Aug 2015 23:04:02 +0200 (CEST)
>> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>> CC: eliz@gnu.org, gdb-patches@sourceware.org, guile-devel@gnu.org
>>
>> 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.
>
> I might be missing something, because I don't see why.

The goal here is to block these signals from being sent to the threads
that Guile (or more specifically libgc) creates.
Posix threads inherit the current value of the process's sigmask,
so as long as the threads are started during Guile initialization,
we can achieve this by blocking the signals before calling Guile's init
routine and then restoring them after Guile's init routine returns.
Note that we don't want to prevent gdb from getting the signals,
we just want them to be sent to gdb's main thread.

Not sure how to do that on windows.



  reply	other threads:[~2015-09-01  5:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29 17:22 [RFC] Block all async signals used by gdb when initializing Guile Doug Evans
2015-08-29 19:11 ` Eli Zaretskii
2015-08-29 19:20   ` Doug Evans
2015-08-29 20:16     ` Eli Zaretskii
2015-08-29 20:39       ` Doug Evans
2015-08-29 21:04         ` Mark Kettenis
2015-08-30  2:37           ` Eli Zaretskii
2015-09-01  5:05             ` Doug Evans [this message]
2015-09-01 14:35               ` Eli Zaretskii
2015-09-01 15:22                 ` Doug Evans
2015-09-01 15:50                   ` Eli Zaretskii
2015-08-30  2:35         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP9bCMSC3-NKPptfdisum8Au50yF_LbFb9e2sP6jfGxNPOZSDA@mail.gmail.com \
    --to=xdje42@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=guile-devel@gnu.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).