refuse to accept direct calls after main_thread received a TERM signal