summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-21 05:40:49 +0000
committerZefram <zefram@fysh.org>2017-12-21 05:47:52 +0000
commitfe2024f944c63d1ef0759b7fcf1b4577462ba167 (patch)
treea159d3e90d9d06b020179ecc993b075a529cf977 /ext
parent946b6ed4ec08dfa012129f650bc1259f5ea1dd48 (diff)
downloadperl-fe2024f944c63d1ef0759b7fcf1b4577462ba167.tar.gz
fix up faulty perl embeddings
Some platform-specific embeddings of perl were misusing the return values from perl_parse() and perl_run(), in some cases causing failure due to exit(0) combined with the recent changes in commit 0301e899536a22752f40481d8a1d141b7a7dda82. Commit d4a50999a5525c2681d59cae5fcd94f94ff897fd partially fixed a Windows embedding. More fully fix that, along with NetWare and OS/2. Even in embeddings with correct logic, stop using a variable named "exitstatus" to hold the result of perl_parse() or perl_run(), to avoid misleading people who copy the code.
Diffstat (limited to 'ext')
-rw-r--r--ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
index fec33a42c6..6090970adc 100644
--- a/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
+++ b/ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
@@ -6,7 +6,7 @@ use ExtUtils::Embed 1.31, qw(xsi_header xsi_protos xsi_body);
our @ISA = qw(Exporter);
our @EXPORT = qw(writemain);
-our $VERSION = '1.07';
+our $VERSION = '1.08';
# blead will run this with miniperl, hence we can't use autodie or File::Temp
my $temp;
@@ -151,8 +151,7 @@ main(int argc, char **argv, char **env)
PL_perl_destruct_level = 0;
}
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
- exitstatus = perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);
- if (!exitstatus)
+ if (!perl_parse(my_perl, xs_init, argc, argv, (char **)NULL))
perl_run(my_perl);
#ifndef PERL_MICRO