I'm currently testing my framework with 5.3-alpha. In 5.3-alpha and the devel branch, foreground dead jobs are reported by the `jobs' builtin with function substitutions:
$ bash-5.3-alpha --norc $ a=${ (true) }; b=${ jobs; }; declare -p b declare -- b="[1] Done ( true )" I expect the jobs builtin to exclude the foreground dead jobs in the above command. This doesn't happen with slightly different versions like $ a=${ (true) }; b=${ (jobs); }; declare -p b $ (true); b=${ jobs; }; declare -p b $ a=${ (true) }; b=$(jobs); declare -p b $ a=${ (true) }; jobs $ a=${ (true) }; (jobs) I would like to get the list of the background dead jobs using the `jobs' builtin, but this behavior contaminates it with the foreground ones as far as I use the function substitutions. If the current behavior would be the intended one, I would request an option of the `jobs' builtin that excludes the foreground dead jobs. -- Koichi