I have several old bash scripts, that include traps for SIGCHLD. The intention was to catch failures or interrupts in user commands executed within these scripts, allowing the whole script to abort immediately. In Mageia 7 (5.10.46-desktop-1.mga7), for example, this seems to have had the intended effect. Now with kernel 6.5.13-desktop-6.mga9 it seems like SIGCHLD is generated even on normal terminations of child processes.
Reading the description it seems like this might be the expected posix behaviour (but it breaks this previous *simple* use of SigCHLD to try to capture user interrupts during a child process). While I can see how to solve this by elimintating the "trap" and recoding all the user programs that are executed within the scripts to ensure they return the proper exit codes I am curious to know why this behaviour changed with the newer kernels? Is there some kernel setting controlling this?