In a dot script sourced with 'command .' (which is useful to avoid exiting if the script doesn't exist), triggering a syntax error in an 'eval' in a subshell causes dash to hang at the end of the main script. Test script (depends on the non-standard /dev/stdin, but it works the same with a separate dot script): command . /dev/stdin <<EOF ( eval 'esac' ) && echo WOOPS EOF echo end The syntax error and 'end' are both printed, then dash hangs. This is reproducible in dash 0.5.10 and later, at least on my system (Mac OS X 10.11.6). Interestingly, changing 'eval' to 'command eval' avoids the bug, even though it is still run in a subshell. - Martijn