bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

signals ignored in a subshell


From: Oğuz
Subject: signals ignored in a subshell
Date: Sat, 4 Apr 2020 08:32:57 +0300

While waiting for read builtin to complete, bash executes signal handlers
in a subshell where signals are ignored. See below.

$ foo() { trap foo INT; read; }
$ set -x
$ foo
+ foo
+ trap foo INT
+ read
^C++ foo
++ trap foo INT
++ read
^C^C^C
(the only way to exit is tapping enter twice; i.e finishing both reads)

dash and mksh interrupts read and executes handler in CEE, zsh does
something similar to bash. Is this a bug or an undocumented feature?




-- 
Oğuz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]