How to be noticed when a background job failed (through any signal SEGV, ABRT, KILL, INT ...), when the job is in the background in a linux bash script.
set -e
foo &
foo_pid=$!
# Do tasks that requires that foo is running
wait $foo_pid
does not work.