move the related code from exit_notify() to exit_signals()