Debugger: Fix interrupting via console

Amends 89646aadce.

Change-Id: Ibb644dc8897a967bd691155fe5be2eb2165b01f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2021-12-02 09:10:05 +01:00
parent 26ba5bdb0c
commit e1370a01ff

View File

@@ -325,6 +325,13 @@ int main(int argc, char *argv[])
kill(chldPid, SIGKILL); kill(chldPid, SIGKILL);
} }
break; break;
case 'i':
if (chldPid > 0) {
int res = kill(chldPid, SIGINT);
if (res)
perror("Stub could not interrupt inferior");
}
break;
case 'c': { case 'c': {
int res = write(blockingPipe[1], &c, 1); int res = write(blockingPipe[1], &c, 1);
if (res < 0) if (res < 0)