From: Mark Kettenis <kettenis@wins.uva.nl>
To: msnyder@cygnus.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] Linux threads, SIGINT handling
Date: Sat, 26 May 2001 01:07:00 -0000 [thread overview]
Message-ID: <200105260807.f4Q87Id00253@delius.kettenis.local> (raw)
In-Reply-To: <3B0EB00D.6F856A32@cygnus.com>
Date: Fri, 25 May 2001 12:18:37 -0700
From: Michael Snyder <msnyder@cygnus.com>
Mark,
When a user types ^C(break) at a tty on Linux, SIGINT is sent to every
thread in the process group (whether by the kernel or by the manager
thread, I do not know). The effect is that, if you type ^C once, you
have to say "continue" N times (once for every user thread).
It's the kernel that sends all those SIGINTs, since to the kernel our
program is just a bunch of processes sharing their VM. And indeed,
the effect is rather annoying.
This patch handles that problem by discarding the redundant SIGINT
events (ie. all of them except the one that was actually detected in
lin_lwp_wait).
I don't think it's OK to unconditionally discard the SIGINT events.
The process might want to do something special with those, and may
depend on getting them in every thread. How about changing the
else if (WSTOPSIG (status) == SIGINT)
into
else if (WSTOPSIG (status) == SIGINT
&& signal_pass_state (SIGINT) == 0)
? Not passing SIGINT to the inferior is GDB's default, so this will
work fine for most people. And this way people can say
"handle SIGINT pass"
ignore the warning, and have SIGINT delivered to all threads.
If you agree, it's OK to check this in with that change.
Mark
next parent reply other threads:[~2001-05-26 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3B0EB00D.6F856A32@cygnus.com>
2001-05-26 1:07 ` Mark Kettenis [this message]
2001-05-30 11:10 ` Michael Snyder
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=200105260807.f4Q87Id00253@delius.kettenis.local \
--to=kettenis@wins.uva.nl \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@cygnus.com \
/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