In Bash 5.0.3, I'm running the following command and I'm curious why the output spawns an additional shell after the first one completes?
( ( ( sleep 1 ) && echo "done sleeping for one second" & ) || \
( ( sleep 0.5 ) && echo "done sleeping for half second" & ) ) && echo $?
By spawn an additional shell, I mean the terminal itself returns the prompt to the user and interrupts it once again:
user@system $ ( ( ( sleep 1 ) && echo "done sleeping for one second" & ) || ( ( sleep 0.5 ) && echo "done sleeping for half second" & ) ) && echo $?
0
user@system $ done sleeping for one second
^C
user@system $