public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Alexey Lapshin <alexey.lapshin@espressif.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"tom@tromey.com" <tom@tromey.com>
Cc: Alexey Gerenkov <alexey.gerenkov@espressif.com>,
	Anton Maklakov <anton.maklakov@espressif.com>,
	Ivan Grokhotkov <ivan@espressif.com>
Subject: Re: [PATCH] gdb/python: initialize Python without signal handlers
Date: Wed, 21 Dec 2022 16:12:09 +0000	[thread overview]
Message-ID: <53c1be21ece4b465c6874be5857f6ef749b0cd1b.camel@espressif.com> (raw)
In-Reply-To: <87tu1pkemc.fsf@tromey.com>

> We fixed this a different way.
Could you please give a commit hash?

> For example, if it affects Python scripts

I don't think that will break anything, because Python only sets
SIGPIPE, SIGXFZ, SIGXFSZ signals to ignore
(https://github.com/python/cpython/blob/0e081a089ec969c9a34f5ff25886205616ef4dd3/Modules/signalmodule.c#L1910-L1918
). And sets SIGINT signal handler, which is not using. Because POSIX
standard declares that only one signal handler could be set for a
signal. We know that Python SIGINT-handler is not using in GDB for
linux because we could not stop debugging applications otherwise.

I just wanted to init Python properly. See also a comment in Python
source code. It also is not strictly related to this patch, but could
be interesting for
you. https://github.com/python/cpython/blob/135ec7cefbaffd516b77362ad2b2ad1025af462e/Python/pythonrun.c#L1680-L1687

Regards,
Alexey

      reply	other threads:[~2022-12-21 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:42 Alexey Lapshin
2022-11-09 20:12 ` Tom Tromey
2022-11-09 20:40   ` Alexey Lapshin
2022-12-20 20:24     ` Tom Tromey
2022-12-21 16:12       ` Alexey Lapshin [this message]

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

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

  git send-email \
    --in-reply-to=53c1be21ece4b465c6874be5857f6ef749b0cd1b.camel@espressif.com \
    --to=alexey.lapshin@espressif.com \
    --cc=alexey.gerenkov@espressif.com \
    --cc=anton.maklakov@espressif.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ivan@espressif.com \
    --cc=tom@tromey.com \
    /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).