Files
bash/tests/jobs7.sub
2022-01-20 15:06:05 -05:00

9 lines
197 B
Plaintext

# make sure fg in a subshell doesn't try to start a parent's job
set -m
sleep 20 &
echo $(jobs)
echo $(fg %% ; jobs)
# suppress any message about sleep 20 being terminated
exec 2>/dev/null
kill %1