We can't directly call a signal handler like this Instead emit the signal (cherry picked from commit ad53956e)