Reinstate mailrun pid logic.