move die notifier handling to common code