Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11556
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Stephane Chazelas <stephane.chazelas@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: SIGINT handling |
| Date | Thu, 24 Sep 2015 11:53:35 +0100 |
| Lines | 38 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1711.1443092023.19560.bug-bash@gnu.org> (permalink) |
| References | <20150918151439.GA16455@chaz.gmail.com> <55FDC8B4.4000505@case.edu> <20150919213101.GA4393@chaz.gmail.com> <56035164.30105@case.edu> <20150924060122.GA4338@chaz.gmail.com> <20150924062044.GA5756@chaz.gmail.com> <5603B5F8.3080800@draigBrady.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | usenet.stanford.edu 1443092024 7577 208.118.235.17 (24 Sep 2015 10:53:44 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash <bug-bash@gnu.org>, Chet Ramey <chet.ramey@case.edu> |
| To | Pádraig Brady <P@draigBrady.com> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1pKeRCDqQ5MvVndKxgvBRBzhY0W+Io9mHoyZ57O9s04=; b=P8Xz4HLailoSqUJG/2FKhh4YVDo77uTmgBFUgeqMRWZlr2/LHbcZ68yKB/Z9RZ1d/A Tlex5PjFuFADwi0G98YGOvXrDTRVj5lrZWsM783fTHDG8SjFZyO9Mnyp5l2/pQGG7Kkt 9Zn1u88Lvqh7/mSZW2N36epiOCmwywPBDAaeRJ7U2LDYELGo7tGP0KOef7p1BjU7FB26 99a/Mf8Q4CgLskOAr7fvZpT0JGg5bXAnGAMwx/gmM51mSfzj9zovf/twNLkM49J5zR3n x9au9YZDZDIl45d5Jf2NZgANYfMYps0jPtFmjzk57aZnrbCnTxkA2S7SgK32/EkopQHE FMLQ== |
| X-Received | by 10.194.5.35 with SMTP id p3mr48334483wjp.132.1443092016952; Thu, 24 Sep 2015 03:53:36 -0700 (PDT) |
| Content-Disposition | inline |
| In-Reply-To | <5603B5F8.3080800@draigBrady.com> |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| X-detected-operating-system | by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). |
| X-Received-From | 2a00:1450:400c:c05::229 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11556 |
Show key headers only | View raw
2015-09-24 09:36:08 +0100, Pádraig Brady:
[...]
> > (gdb) handle SIGINT nostop pass
[...]
>
> In case it's relevant, I'm not entirely sure of gdb's signal handling:
> https://sourceware.org/bugzilla/show_bug.cgi?id=18364
Yes, I wondered about that.
I'd expect the "handle SIGINT nostop pass", to take gdb out of
the loop, but I've not verified it and I suspect ptracing could
have side effects.
It's easy to corroborate with printfs though here which I just
did:
$ ./bash -c './a; echo x'
^Cwait_sigint_received=1 pid=-1
wait_sigint_received=1 pid=956
x
$ ./bash -c './a; echo x'
^Cwait_sigint_received=1 pid=958
$ diff -pu jobs.c\~ jobs.c
--- jobs.c~ 2015-09-20 20:03:14.692119372 +0100
+++ jobs.c 2015-09-24 11:49:03.963122465 +0100
@@ -3262,6 +3262,7 @@ itrace("waitchld: waitpid returns %d blo
require the child to actually die due to SIGINT to act on the
SIGINT we received; otherwise we assume the child handled it and
let it go. */
+ fprintf(stderr, "wait_sigint_received=%d pid=%d\n", wait_sigint_received, pid);
if (pid < 0 && errno == EINTR && wait_sigint_received)
child_caught_sigint = 1;
--
Stephane
Back to gnu.bash.bug | Previous | Next | Find similar
Re: SIGINT handling Stephane Chazelas <stephane.chazelas@gmail.com> - 2015-09-24 11:53 +0100
csiph-web