[core] Fix missing trap EXIT after SIGINT