Don't go into implicit interactive mode without ever executing anything - not even `exit` or reacting to ctrl-d. That just renders the shell useless and unquittable.