require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
}
+our $TODO;
use ExtUtils::testlib;
'exit(99);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]);
-is($?>>8, 86, 'thread->exit(status) in main');
-
+{
+ local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS';
+ is($?>>8, 86, 'thread->exit(status) in main');
+}
$thr = threads->create({'exit' => 'thread_only'}, sub {
exit(1);
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]);
-is($?>>8, 86, "'use threads 'exit' => 'thread_only'");
-
+{
+ local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS';
+ is($?>>8, 86, "'use threads 'exit' => 'thread_only'");
+}
my $out = run_perl(prog => 'use threads 1.63;' .
'threads->create(sub {' .
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ],
stderr => 1);
-is($?>>8, 99, "exit(status) in thread");
+{
+ local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS';
+ is($?>>8, 99, "exit(status) in thread");
+}
like($out, '1 finished and unjoined', "exit(status) in thread");
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ],
stderr => 1);
-is($?>>8, 99, "set_thread_exit_only(0)");
+{
+ local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS';
+ is($?>>8, 99, "set_thread_exit_only(0)");
+}
like($out, '1 finished and unjoined', "set_thread_exit_only(0)");
'exit(86);',
nolib => ($ENV{PERL_CORE}) ? 0 : 1,
switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]);
-is($?>>8, 99, "exit(status) in thread warn handler");
-
+{
+ local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS';
+ is($?>>8, 99, "exit(status) in thread warn handler");
+}
$thr = threads->create(sub {
$SIG{__WARN__} = sub { threads->exit(); };