[GHC] #10017: signal handlers are invoked multiple times when the threaded rts is used