public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Update Python signal-handling documentation
@ 2023-09-11 15:22 Tom Tromey
  2023-09-11 16:03 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2023-09-11 15:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

I noticed a typo in the "Basic Python" node, and when fixing it
realized that the paragraph could use a link to the block_signals
function.  This patch is the result.
---
 gdb/doc/python.texi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index e9936991c49..af6360ab3f8 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -247,12 +247,14 @@ Some care must be taken when writing Python code to run in
 
 @itemize @bullet
 @item
-@value{GDBN} install handlers for @code{SIGCHLD} and @code{SIGINT}.
+@value{GDBN} installs handlers for @code{SIGCHLD} and @code{SIGINT}.
 Python code must not override these, or even change the options using
 @code{sigaction}.  If your program changes the handling of these
 signals, @value{GDBN} will most likely stop working correctly.  Note
 that it is unfortunately common for GUI toolkits to install a
-@code{SIGCHLD} handler.
+@code{SIGCHLD} handler.  When creating a new Python thread, you can
+use @code{gdb.block_signals} or @code{gdb.Thread} to handle this
+correctly; @xref{Threading in GDB}.
 
 @item
 @value{GDBN} takes care to mark its internal file descriptors as
-- 
2.40.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Update Python signal-handling documentation
  2023-09-11 15:22 [PATCH] Update Python signal-handling documentation Tom Tromey
@ 2023-09-11 16:03 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-09-11 16:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

> Cc: Tom Tromey <tromey@adacore.com>
> Date: Mon, 11 Sep 2023 09:22:50 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
> 
> I noticed a typo in the "Basic Python" node, and when fixing it
> realized that the paragraph could use a link to the block_signals
> function.  This patch is the result.

Thanks.

> -@code{SIGCHLD} handler.
> +@code{SIGCHLD} handler.  When creating a new Python thread, you can
> +use @code{gdb.block_signals} or @code{gdb.Thread} to handle this
> +correctly; @xref{Threading in GDB}.
              ^^^^^
This should be @pxref or "see @ref"; @xref is only pertinent at the
beginning of a sentence, since it produces a capitalized "See".

OK with that nit fixed.

Approved-By: Eli Zaretskii <eliz@gnu.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-11 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 15:22 [PATCH] Update Python signal-handling documentation Tom Tromey
2023-09-11 16:03 ` Eli Zaretskii

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).