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


Groups > gnu.bash.bug > #15787 > unrolled thread

Spurious recursive trap invocation warning

Started byMartijn Dekker <martijn@inlv.org>
First post2019-12-29 19:34 +0000
Last post2019-12-29 19:34 +0000
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Spurious recursive trap invocation warning Martijn Dekker <martijn@inlv.org> - 2019-12-29 19:34 +0000

#15787 — Spurious recursive trap invocation warning

FromMartijn Dekker <martijn@inlv.org>
Date2019-12-29 19:34 +0000
SubjectSpurious recursive trap invocation warning
Message-ID<mailman.1648.1577648096.1979.bug-bash@gnu.org>
The current git version of bash (at least on x86_64-apple-darwin18.7.0) 
gives a spurious warning about a recursive trap invocation when running 
the following more than once on an interactive shell. The trap unsets 
itself before resending the signal, so there should be no recursive 
invocation.

bash-5.0$ echo $BASH_VERSION
5.0.11(1)-maint
bash-5.0$ trap 'echo int; trap - INT; kill -s INT $$' INT; kill -s INT $$
int

bash-5.0$ trap 'echo int; trap - INT; kill -s INT $$' INT; kill -s INT $$
bash: warning: run_pending_traps: recursive invocation while running 
trap for signal 2
int

bash-5.0$ trap 'echo int; trap - INT; kill -s INT $$' INT; kill -s INT $$
bash: warning: run_pending_traps: recursive invocation while running 
trap for signal 2
int

Thanks and happy new year,

- M.

-- 
modernish -- harness the shell
https://github.com/modernish/modernish

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web