Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org, Joel Brobecker <brobecker@adacore.com>
Subject: Re: [RFC] control-c handling on Windows...
Date: Sat, 10 May 2008 15:31:00 -0000	[thread overview]
Message-ID: <20080510043413.GA5429@ednor.casa.cgf.cx> (raw)
In-Reply-To: <20080510013336.GC28890@adacore.com>

On Fri, May 09, 2008 at 06:33:37PM -0700, Joel Brobecker wrote:
>> But, if your patch fixes the problem I'm ok with checking it in.
>
>I think that this is probably the easiest to solve all problems.
>Here is the same patch, but with a comment explaining why we temporarily
>ignore SIGINT...
>
>2008-05-10  Joel Brobecker  <brobecker@adacore.com>
>
>        * win32-nat.c (win32_wait): Ignore SIGINT while waiting for
>        a debug event.
>
>I thought you might have some comments/suggestions on the comment,
>so I'll wait for your OK before checking it in.

I don't think the comment is right.  I think it is expected behavior
that both gdb and the inferior should see the CTRL-C since they are both
associated with the same console.  I don't know this for sure because
Windows concept of process groups are sort of a mystery to me.

I think the way this is handled in linux is by resetting the controlling
process group of the terminal to the pid of the inferior.  On thinking
about this more, I think it probably makes more sense to bracket the
call with:

  SetConsoleCtrlHandler (NULL, TRUE);
  retval = get_win32_debug_event (pid, ourstatus);
  SetConsoleCtrlHandler (NULL, FALSE);

That's almost equivalent to what linux does with process groups I think.

Does the above work in your scenario, Joel?  If so, I think this is
safe to check in.

cgf


  reply	other threads:[~2008-05-10  4:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  9:46 Joel Brobecker
2008-05-10  4:34 ` Christopher Faylor
2008-05-10 13:10   ` Joel Brobecker
2008-05-10 15:31     ` Christopher Faylor [this message]
2008-05-10 22:28       ` Joel Brobecker
2008-05-11  5:30         ` Christopher Faylor
2008-05-11 13:31         ` Joel Brobecker
2008-05-11 13:46           ` Eli Zaretskii
2008-05-11 13:58           ` Christopher Faylor
2008-05-11 21:26             ` Joel Brobecker
2008-05-17 11:38               ` Christopher Faylor
2008-05-21  0:34                 ` Joel Brobecker
2008-05-21  3:19                   ` Christopher Faylor

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=20080510043413.GA5429@ednor.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@sourceware.org \
    --cc=brobecker@adacore.com \
    --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