test_recovery_sigint depends on its process has SIG_DEF sigaction for SIGINT. When its parent process set SIG_IGN which inherits to children, then this test fails. This patch ensures this precondition met regardless of inherited sigaction from its parent.
Add test for restoration of other SIGINT handlers
Add another variant of test_recovery_sigint to ensure IRB to preserve existing SIGINT handler other than SIG_DEF.
[ruby/irb] test_recovery_sigint: Ensure precondition is met
(https://github.com/ruby/irb/pull/829)
test_recovery_sigint depends on its process has SIG_DEF sigaction for
SIGINT. When its parent process set SIG_IGN which inherits to children,
then this test fails. This patch ensures this precondition met
regardless of inherited sigaction from its parent.
Add another variant of test_recovery_sigint to ensure IRB to preserve
existing SIGINT handler other than SIG_DEF.
https://github.com/ruby/irb/commit/77ee59d026