From 6281d42615d02016987feda08aabf27dfe054db3 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 26 Jun 2012 17:56:44 +1000 Subject: [PATCH] [perl #45173] port the test to MSWin32 --- t/op/sigdispatch.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/t/op/sigdispatch.t b/t/op/sigdispatch.t index 13303fd..1ce047d 100644 --- a/t/op/sigdispatch.t +++ b/t/op/sigdispatch.t @@ -10,6 +10,7 @@ use strict; use Config; plan tests => 29; +$| = 1; watchdog(15); @@ -150,11 +151,13 @@ like $@, qr/No such hook: __DIE__\\0whoops at/; # [perl #45173] { - my $hup_called; - local $SIG{HUP} = sub { $hup_called = 1 }; + my $int_called; + local $SIG{INT} = sub { $int_called = 1; }; $@ = "died"; is($@, "died"); - kill 'HUP', $$; - is($hup_called, 1); + kill 'INT', $$; + # this is needed to ensure signal delivery on MSWin32 + sleep(1); + is($int_called, 1); is($@, "died"); } -- 1.8.3.1