If the power goes out there will be no signalling on the tracks, no barriers or traffic lights at level crossings, no lights or announcements at train stations, etc.
Even though a diesel locomotive technically could run with no external power, no regular train will be operating during a general power outage.
Same goes for an EMP, even though that would likely fry the diesel locos control systems anyways