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