Use _exit in SIGTERM handler, fixes bug #3497.