From ed51a345f34e4dd7c7c58241f538c01d9f58b539 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 26 Aug 2013 15:32:36 +1000 Subject: [perl #85104] TODO test for preserving $^E across signal handlers and tests Win32 signal emulation too --- t/win32/signal.t | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 t/win32/signal.t (limited to 't/win32') diff --git a/t/win32/signal.t b/t/win32/signal.t new file mode 100644 index 0000000000..71a6e7dc97 --- /dev/null +++ b/t/win32/signal.t @@ -0,0 +1,77 @@ +#!./perl +# Tests for signal emulation + +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + + # only used for skip_all, the forking confuses test.pl + require "./test.pl"; +} + +BEGIN { + unless ($^O =~ /^MSWin/) { + skip_all('windows specific test'); + } +} + +skip_all("requires compilation with PERL_IMPLICIT_SYS") + unless $Config{ccflags} =~/(?:\A|\s)-DPERL_IMPLICIT_SYS\b/; + +++$|; + +# manual test counting because the forks confuse test.pl +print "1..4\n"; + +use Config; + +# find a safe signal, the implementation shouldn't be doing anything +# funky with NUMdd signals +my ($sig) = grep /^NUM/, split ' ', $Config{sig_name}; + +# otherwise, hope CONT is safe +$sig ||= "CONT"; + +SKIP: +{ + # perl #85104 + use warnings; + my $pid = fork; + + unless (defined $pid) { + print <