Make the signal handling concurrent safe.