Date: Fri, 13 Jan 2023 00:34:02 +0100 From: Tycho Kirchner <tychokirch...@mail.de> Message-ID: <7d59c17d-792e-0ac7-fd86-b3b2e7d4b...@mail.de>
| we found quite some inconsistency and weirdness | in the handling of SIGINT's during async function calls Not inconsistent or weird, and has nothing to do with function calls. | and were wondering, whether those are expected. Expected and required. | The main INT handler is never executed in foofunc [...] | Thus printing the trap apparently changes bash's behavior. Nonsense (the conclusion). When an async command (any command, not just functions, or blocks enclosed in { } ) is run with job control disabled, SIGINT is ignored for that async command. (SIGQUIT too). That has been the way shells work since before either the Bourne shell (and all later shells based upon it, like bash) or job control, were invented. That is all you are seeing here. kre