From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 89D543857438; Mon, 20 Mar 2023 15:53:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89D543857438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679327603; bh=93As97Rgih1JPYkxvIvi3Li60IhFiPSoZjkEcLTslpY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mj7L3h0T/bmrZ6WG7lyG5cTWsrWhTe4eAl9PFtckdpZoP+MlsQl0OiCt8dAkmQSZR 8BVTx57rngYmV7Ljxt6JUbdSpNjagUcoEYQNpa+hqKtqzy5MQOlpXpe+DNiEmYuBll O3qmOMSIex7pLXRHEt9Id4Y17L5r1Wt8R/efFHEI= From: "eldar.abusalimov at jetbrains dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/18772] gdb does not respond to CTRL-C Date: Mon, 20 Mar 2023 15:53:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: eldar.abusalimov at jetbrains dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D18772 Eldar Abusalimov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eldar.abusalimov@jetbrains. | |com --- Comment #17 from Eldar Abusalimov --- There's one more thing why the naive `kill (-signal_pid, SIGINT);` is wrong. In case the target PID is 1, it calls `kill` passing -1 to it, which has a special meaning (quoting https://man7.org/linux/man-pages/man2/kill.2.html#DESCRIPTION): If pid equals -1, then sig is sent to every process for which the calling process has permission to send signals, except for process 1 (init), but see below. That is, it attempts to interrupt any process other than the one it is supp= osed to! Debugging PID 1 may sound an edge case, but it is actually perfectly fine t= o do so in case of a sole process running inside a Docker container. In other wo= rds, it's not necessarily even the init process, like systemd or upstart, it's o= ften a legit regular program that you develop yourself. --=20 You are receiving this mail because: You are on the CC list for the bug.=