diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-11 09:21:26 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-09-11 10:41:19 -0600 |
commit | 14432bde076fdee66e6163993eadf592742935da (patch) | |
tree | 6837505989d6b9f51066c0620f9c5eec99526de4 | |
parent | 31131df04b7b14257a7e4acd3ed3d843c6f98bad (diff) | |
download | gdb-14432bde076fdee66e6163993eadf592742935da.zip gdb-14432bde076fdee66e6163993eadf592742935da.tar.gz gdb-14432bde076fdee66e6163993eadf592742935da.tar.bz2 |
Update Python signal-handling documentation
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.
Approved-By: Eli Zaretskii <eliz@gnu.org>
-rw-r--r-- | gdb/doc/python.texi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index e993699..5b13958 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; see @ref{Threading in GDB}. @item @value{GDBN} takes care to mark its internal file descriptors as |