Making a shell script survive quit