From: pinskia@gmail.com
To: Daniel Colascione <dancol@dancol.org>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC] [PATCH] Kill processes, not process groups
Date: Thu, 14 May 2015 08:17:00 -0000 [thread overview]
Message-ID: <FB726202-8E68-4EB1-BF90-F4457085892A@gmail.com> (raw)
In-Reply-To: <555455E2.3060905@dancol.org>
> On May 14, 2015, at 12:59 AM, Daniel Colascione <dancol@dancol.org> wrote:
>
> Killing process groups for interruption doesn't make any sense. Say we
> have a two-process group [A B], where A is the leader. If we attach to
> A and use "interrupt", we accidentally kill B. If we attach to B,
> "interrupt" does nothing. Why wouldn't we just signal A?
>
> This problem is worse in the gdbserver case. Locally, we use
> pass_signal, not interrupt, for C-c, and pass_signal does the right
> thing. But in the remote case, we have nothing but interrupt, and that
> doesn't seem to do users intend.
>
> commit 8d096e713e46f00bc8bf55743288a24f6222021f
> Author: Daniel Colascione <dancol@dancol.org>
> Date: Wed May 13 23:58:24 2015 -0700
>
> Kill the process we're dealing with, not the whole group
>
> diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
> index 4da11c6..8a725fa 100644
> --- a/gdb/gdbserver/linux-low.c
> +++ b/gdb/gdbserver/linux-low.c
> @@ -4904,7 +4904,7 @@ linux_request_interrupt (void)
>
> /* Send a SIGINT to the process group. This acts just like the user
> typed a ^C on the controlling terminal. */
> - kill (-signal_pid, SIGINT);
> + kill (signal_pid, SIGINT);
Your patch did not update the comment though. So it raises the question which is the correct behavior.
Thanks,
Andrew
> }
>
> /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET
>
next prev parent reply other threads:[~2015-05-14 8:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 7:59 Daniel Colascione
2015-05-14 8:17 ` pinskia [this message]
2015-05-14 8:18 ` Daniel Colascione
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FB726202-8E68-4EB1-BF90-F4457085892A@gmail.com \
--to=pinskia@gmail.com \
--cc=dancol@dancol.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox