From e1370a01ff14b71adc9d601be6621851be2ac357 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 2 Dec 2021 09:10:05 +0100 Subject: [PATCH] Debugger: Fix interrupting via console Amends 89646aadce. Change-Id: Ibb644dc8897a967bd691155fe5be2eb2165b01f9 Reviewed-by: Christian Stenger Reviewed-by: --- src/libs/utils/process_stub_unix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/utils/process_stub_unix.c b/src/libs/utils/process_stub_unix.c index 856efa26af9..1cb3e8aa264 100644 --- a/src/libs/utils/process_stub_unix.c +++ b/src/libs/utils/process_stub_unix.c @@ -325,6 +325,13 @@ int main(int argc, char *argv[]) kill(chldPid, SIGKILL); } break; + case 'i': + if (chldPid > 0) { + int res = kill(chldPid, SIGINT); + if (res) + perror("Stub could not interrupt inferior"); + } + break; case 'c': { int res = write(blockingPipe[1], &c, 1); if (res < 0)