Revered previous commit, was not appropriate for signal handling since it handles ALL exit.