Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Smith <paul@mad-scientist.net>
To: Pedro Alves <palves@redhat.com>, Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb@sourceware.org
Subject: Re: GDB (not) handling SIGINT...?
Date: Thu, 15 Nov 2018 16:01:00 -0000	[thread overview]
Message-ID: <8b205cb2ff59c49ab9f4ad98564dfea3f5d1586d.camel@mad-scientist.net> (raw)
In-Reply-To: <e4b704f2-58f1-f8d9-1ce1-61f2eaed43ab@redhat.com>

On Thu, 2018-11-15 at 13:55 +0000, Pedro Alves wrote:
> #2 - If you attach to a process instead of running it from GDB, then ctrl-c
>      reaches gdb first, and then GDB sends/forwards a SIGINT to the child process.

To me this seems to be the problem.  I've explicitly said I don't want
the signal passed to the process under debug (not a child process in
this situation right?)--in fact that's the default setting for SIGINT
--but yet GDB is still passing the signal along.

Isn't that incorrect behavior?

Is it there just for parity between the behavior of attaching to an
existing process versus running the process under GDB?  I'd prefer it
work one way and not the other, rather than not work either way :).

In my environment I'm _always_ attaching because our processes need to
be started through a separate service, or they don't have proper
security tokens to join the system.  So it would work OK for me if just
the attached version behaved as expected.  I get that others may have
different needs.


  reply	other threads:[~2018-11-15 16:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 22:37 Paul Smith
2018-11-14 22:32 ` Simon Marchi
2018-11-15 13:55   ` Pedro Alves
2018-11-15 16:01     ` Paul Smith [this message]
2018-11-15 16:24       ` Pedro Alves
2018-11-15 18:01         ` Paul Smith
2018-11-15 18:04           ` Pedro Alves
2018-11-15 18:27             ` Paul Smith
2018-11-19 19:07         ` Paul Smith
2018-11-19 19:44           ` Paul Smith

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=8b205cb2ff59c49ab9f4ad98564dfea3f5d1586d.camel@mad-scientist.net \
    --to=paul@mad-scientist.net \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /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