Bug 29185 - GDB claims it was killed by a KeyboardInterrupt if it was killed by SIGTERM
Summary: GDB claims it was killed by a KeyboardInterrupt if it was killed by SIGTERM
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: cli (show other bugs)
Version: 12.1
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-25 22:21 UTC by Volker Weißmann
Modified: 2022-05-25 23:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Weißmann 2022-05-25 22:21:22 UTC
# How to reproduce:

Start gdb, then run 
> pkill --signal SIGTERM gdb
in another terminal.

# Observed outcome

[volker@battle ~]$ gdb
GNU gdb (GDB) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Exception ignored in: <gdb._GdbOutputFile object at 0x7fc1bed57160>
Traceback (most recent call last):
  File "/usr/share/gdb/python/gdb/__init__.py", line 47, in flush
    def flush(self):
KeyboardInterrupt: 
[volker@battle ~]$ 

# Expected Outcome:
Something like:

...

For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) Received SIGTERM
[volker@battle ~]$