Check some cases of shell termination