Bash 5.0 includes a new -f option for wait:[1]
j. The `wait' builtin now has a `-f' option, which signfies to wait until the
specified job or process terminates, instead of waiting until it changes
state.
What does wait -f $pid do as opposed to the default wait $pid? Under what conditions is the -f option needed?