Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11509

Re: SIGINT handling

Path csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!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 Sat, 19 Sep 2015 22:31:01 +0100
Lines 55
Approved bug-bash@gnu.org
Message-ID <mailman.1415.1442698269.19560.bug-bash@gnu.org> (permalink)
References <20150918151439.GA16455@chaz.gmail.com> <55FDC8B4.4000505@case.edu>
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 1442698270 5253 208.118.235.17 (19 Sep 2015 21:31:10 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash <bug-bash@gnu.org>
To Chet Ramey <chet.ramey@case.edu>
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=We24zhNnAaE8o4YE0sCANaG7/adh1fVnp7IMs0RTEO4=; b=SWyVR9Rgx7DyCVqxjbWHQKEdYu/l53If+oq2RAQGlehEdyGJ4iivAo/TrhHYZIYLd6 NWHM/QqXnTfdRmQh22/fTgnAJpMhYV0qML605sX9dNF7a0cHXUY0pHeklVcdNxwFUzTv mJreLDq9jOSV/zsyyvTLI6QpCX8HHCp4Lzr8YgLDbSiiHc9KwFui/xNjZo5QDSxNfvNT z2sWlfkSyhb7Pv85Jum0eK4YdjrFfrkTn1eTREULr3t1lV4KvO9AuwX+yMi1lWb0DcEt 8WW0XOmEaS+WngvAoe95MyEjtWzNJeDcqftTaUBZiRG8nVH0hTmaIV/jMoyoqeqlRv7c wdlQ==
X-Received by 10.180.85.103 with SMTP id g7mr4875202wiz.93.1442698263572; Sat, 19 Sep 2015 14:31:03 -0700 (PDT)
Content-Disposition inline
In-Reply-To <55FDC8B4.4000505@case.edu>
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::22a
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:11509

Show key headers only | View raw


2015-09-19 16:42:28 -0400, Chet Ramey:
[...]
> I'm surprised you've managed to avoid the dozen or so discussions on the
> topic.
> 
> http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00108.html
[...]

Thanks for the links. I still think the comments on the second
article I sent
(http://thread.gmane.org/gmane.comp.shells.bash.bugs/24178/focus=24183)
still hold though and from a quick read I don't see those points
being mentioned in the past discussions (but that was a quick
read).

I notice that you mention the race conditions have been fixed,
but I'm still seeing some non-deterministic behaviour.

In case it was caused by some Debian patch, I recompiled the
code of 4.3.42 from gnu.org and the one from the devel branch on
the git repository (commit bash-20150911 snapshot) and still:

$ ./bash -c 'sh -c "trap exit INT; sleep 10; :"; echo hi'
^Chi
$ ./bash -c 'sh -c "trap exit INT; sleep 10; :"; echo hi'
^Chi
$ ./bash -c 'sh -c "trap exit INT; sleep 10; :"; echo hi'
^C
$ ./bash -c 'sh -c "trap exit INT; sleep 10; :"; echo hi'
^Chi

Sometimes (and the frequency of occurrences is erratic,
generally roughly 80% of "hi"s but at times, I don't see a "hi"
in a while), the "hi" doesn't show up. Note that I press ^C well
after sleep has started.

On Linux 4.1.0-1-amd64 core2 duo, bashcompiled with gcc (Debian
5.2.1-16) 5.2.1 20150903 linked with
GNU C Library (Debian GLIBC 2.19-19) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.5.
Compiled on a Linux 4.0.7 system on 2015-07-09.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC

-- 
Stephane

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: SIGINT handling Stephane Chazelas <stephane.chazelas@gmail.com> - 2015-09-19 22:31 +0100

csiph-web