[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
- signals ignored in a subshell,
Oğuz <=
- Re: signals ignored in a subshell, Robert Elz, 2020/04/04
- Re: signals ignored in a subshell, Oğuz, 2020/04/04
- Re: signals ignored in a subshell, Robert Elz, 2020/04/05
- Re: signals ignored in a subshell, Oğuz, 2020/04/05
- Re: signals ignored in a subshell, Chet Ramey, 2020/04/05
- signals ignored in a subshell, Oğuz, 2020/04/06
- Re: signals ignored in a subshell, Oğuz, 2020/04/06
- Re: signals ignored in a subshell, Chet Ramey, 2020/04/06
- Re: signals ignored in a subshell, Robert Elz, 2020/04/06
- Re: signals ignored in a subshell, Robert Elz, 2020/04/06