bpo-30057: Fix potential missed signal in signal.signal(). (#4258)

Bug report and patch by Jeroen Demeyer.
3 files changed