This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [PATCH] threads 1.33
authorJerry D. Hedden <jdhedden@cpan.org>
Tue, 4 Jul 2006 17:18:45 +0000 (10:18 -0700)
committerCraig A. Berry <craigberry@mac.com>
Wed, 5 Jul 2006 02:31:06 +0000 (02:31 +0000)
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-id: <20060704171845.fb30e530d17747c2b054d625b8945d88.f0db2cab53.wbe@email.secureserver.net>

exiting from threads works differently on VMS

p4raw-id: //depot/perl@28481

ext/threads/t/exit.t

index c0621c7..fa395ee 100644 (file)
@@ -239,9 +239,15 @@ foreach my $die (@exit_types) {
 # Check termination warning concerning running threads
 $SIG{'__WARN__'} = sub {
     my $msg = shift;
-    ok($msg =~ /1 running and unjoined/,  '1 running and unjoined');
-    ok($msg =~ /2 finished and unjoined/, '2 finished and unjoined');
-    ok($msg =~ /3 running and detached/,  '3 finished and detached');
+    if ($^O eq 'VMS') {
+        ok($msg =~ /0 running and unjoined/,  '0 running and unjoined (VMS)');
+        ok($msg =~ /3 finished and unjoined/, '3 finished and unjoined (VMS)');
+        ok($msg =~ /0 running and detached/,  '0 finished and detached (VMS)');
+    } else {
+        ok($msg =~ /1 running and unjoined/,  '1 running and unjoined');
+        ok($msg =~ /2 finished and unjoined/, '2 finished and unjoined');
+        ok($msg =~ /3 running and detached/,  '3 finished and detached');
+    }
 };
 
 threads->create(sub { sleep(100); });