Reusable signal handling