scala.tools.util.SignalManager.rSignal
It's hard to believe there's no way to get a signal's current handler without replacing it, but if there is I couldn't find it, so we have this swapping code.
(Since version 2.10.0) Use leftOfArrow instead
(Since version 2.10.0) Use resultOfEnsuring instead