summaryrefslogtreecommitdiff
path: root/lib/ExtUtils
diff options
context:
space:
mode:
authorJohn Gardiner Myers <jgmyers@proofpoint.com>2013-07-29 15:33:09 +1000
committerTony Cook <tony@develop-help.com>2013-07-29 15:33:47 +1000
commit6136213b81ecb05d74939be5083ddfdc96aef566 (patch)
tree2095dac9075d771890cbbefc0ff110b5cfbaa885 /lib/ExtUtils
parent2e06b51cf21f0d70a782e77099e579ac30d69d3b (diff)
downloadperl-6136213b81ecb05d74939be5083ddfdc96aef566.tar.gz
[perl #52000] Warn/abort on attempted perl exit
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r--lib/ExtUtils/t/Embed.t13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t
index fb9db91904..f47d0361be 100644
--- a/lib/ExtUtils/t/Embed.t
+++ b/lib/ExtUtils/t/Embed.t
@@ -17,7 +17,7 @@ print $fh <DATA>;
close($fh);
$| = 1;
-print "1..9\n";
+print "1..10\n";
my $cc = $Config{'cc'};
my $cl = ($^O eq 'MSWin32' && $cc eq 'cl');
my $skip_exe = $^O eq 'os2' && $Config{ldflags} =~ /(?<!\S)-Zexe\b/;
@@ -136,7 +136,7 @@ my $embed_test = File::Spec->catfile(File::Spec->curdir, $exe);
$embed_test = "run/nodebug $exe" if $^O eq 'VMS';
print "# embed_test = $embed_test\n";
$status = system($embed_test);
-print (($status? 'not ':'')."ok 9 # system returned $status\n");
+print (($status? 'not ':'')."ok 10 # system returned $status\n");
unlink($exe,"embed_test.c",$obj);
unlink("$exe.manifest") if $cl and $Config{'ccversion'} =~ /^(\d+)/ and $1 >= 14;
unlink("$exe$Config{exe_ext}") if $skip_exe;
@@ -154,7 +154,7 @@ __END__
#define my_puts(a) if(puts(a) < 0) exit(666)
-static const char * cmds [] = { "perl", "-e", "$|=1; print qq[ok 5\\n]", NULL };
+static const char * cmds [] = { "perl", "-e", "$|=1; print qq[ok 5\\n]; $SIG{__WARN__} = sub { print qq[ok 6\\n] if $_[0] =~ /Unexpected exit/; }; exit 5;", NULL };
#ifdef PERL_GLOBAL_STRUCT_PRIVATE
static struct perl_vars *my_plvarsp;
@@ -184,6 +184,7 @@ int main(int argc, char **argv, char **env) {
my_puts("ok 2");
perl_construct(my_perl);
+ my_perl->Iexit_flags |= PERL_EXIT_WARN;
my_puts("ok 3");
@@ -195,15 +196,15 @@ int main(int argc, char **argv, char **env) {
perl_run(my_perl);
- my_puts("ok 6");
+ my_puts("ok 7");
perl_destruct(my_perl);
- my_puts("ok 7");
+ my_puts("ok 8");
perl_free(my_perl);
- my_puts("ok 8");
+ my_puts("ok 9");
PERL_SYS_TERM();