Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 1 | From bc3b1f6aacf2d8fe66b022fbfcf28cd82c76e52f Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 29 Nov 2018 18:00:23 -0800 |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 9/9] gdbserver ctrl-c handling |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 5 | |
| 6 | This problem was created by the upstream commit 78708b7c8c |
| 7 | After applying the commit, it will send SIGINT to the process |
| 8 | group(-signal_pid). |
| 9 | But if we use gdbserver send SIGINT, and the attached process is not a |
| 10 | process |
| 11 | group leader, then the "kill (-signal_pid, SIGINT)" returns error and |
| 12 | fails to |
| 13 | interrupt the attached process. |
| 14 | |
| 15 | Upstream-Status: Submitted |
| 16 | [https://sourceware.org/bugzilla/show_bug.cgi?id=18945] |
| 17 | |
| 18 | Author: Josh Gao |
| 19 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> |
| 20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 21 | --- |
| 22 | gdbserver/linux-low.cc | 2 +- |
| 23 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 24 | |
| 25 | diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 26 | index 7726a4a0c36..f750e074a03 100644 |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 27 | --- a/gdbserver/linux-low.cc |
| 28 | +++ b/gdbserver/linux-low.cc |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 29 | @@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt () |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 30 | { |
| 31 | /* Send a SIGINT to the process group. This acts just like the user |
| 32 | typed a ^C on the controlling terminal. */ |
| 33 | - ::kill (-signal_pid, SIGINT); |
| 34 | + ::kill (signal_pid, SIGINT); |
| 35 | } |
| 36 | |
| 37 | bool |
| 38 | -- |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 39 | 2.36.1 |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 40 | |