Fixes issue #9535: Fix pending signals that have been received but not
yet handled by Python to not persist after os.fork() in the child process.