event_manager: handle invalid pid contents