Change 28543 by [EMAIL PROTECTED] on 2006/07/11 09:27:25

        Subject: [PATCH] threads 1.36 - Signalling terminated threads core dumps
        From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
        Date: Mon, 10 Jul 2006 13:28:25 -0700
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/ext/threads/Changes#15 edit
... //depot/perl/ext/threads/README#14 edit
... //depot/perl/ext/threads/t/kill.t#5 edit
... //depot/perl/ext/threads/t/thread.t#20 edit
... //depot/perl/ext/threads/threads.pm#65 edit
... //depot/perl/ext/threads/threads.xs#114 edit

Differences ...

==== //depot/perl/ext/threads/Changes#15 (xtext) ====
Index: perl/ext/threads/Changes
--- perl/ext/threads/Changes#14~28529~  2006-07-10 07:04:00.000000000 -0700
+++ perl/ext/threads/Changes    2006-07-11 02:27:25.000000000 -0700
@@ -1,6 +1,9 @@
 Revision history for Perl extension threads.
 
-1.35 - Mon Jul 10 09:44:47 EDT 2006
+1.36 Mon Jul 10 15:58:13 EDT 2006
+       - Ignore signals sent to terminated threads
+
+1.35 Mon Jul 10 09:44:47 EDT 2006
        - Upgraded ppport.h to Devel::PPPort 3.09
        - Fix for Borland compiler
 

==== //depot/perl/ext/threads/README#14 (xtext) ====
Index: perl/ext/threads/README
--- perl/ext/threads/README#13~28529~   2006-07-10 07:04:00.000000000 -0700
+++ perl/ext/threads/README     2006-07-11 02:27:25.000000000 -0700
@@ -1,8 +1,7 @@
-threads version 1.35
+threads version 1.36
 ====================
 
-This module needs perl 5.8.0 or later compiled with 'useithreads'.
-It exposes interpreter threads to the Perl level.
+This module exposes interpreter threads to the Perl level.
 
 INSTALLATION
 
@@ -15,9 +14,7 @@
 
 DEPENDENCIES
 
-This module requires these other modules and libraries:
-
-    threads::shared
+This module needs perl 5.8.0 or later compiled with 'useithreads'.
 
 COPYRIGHT AND LICENCE
 

==== //depot/perl/ext/threads/t/kill.t#5 (text) ====
Index: perl/ext/threads/t/kill.t
--- perl/ext/threads/t/kill.t#4~28355~  2006-06-06 04:02:14.000000000 -0700
+++ perl/ext/threads/t/kill.t   2006-07-11 02:27:25.000000000 -0700
@@ -201,9 +201,11 @@
 sleep(1);
 
 # Terminate the thread
-ok($thr->kill('TERM'), 'Signalled thread to terminate');
+ok($thr->kill('TERM') == $thr, 'Signalled thread to terminate');
 
 $rc = $thr->join();
 ok($rc eq 'OKAY', 'Thread return value');
 
+ok($thr->kill('TERM'), 'Ignore signal to terminated thread');
+
 # EOF

==== //depot/perl/ext/threads/t/thread.t#20 (text) ====
Index: perl/ext/threads/t/thread.t
--- perl/ext/threads/t/thread.t#19~28529~       2006-07-10 07:04:00.000000000 
-0700
+++ perl/ext/threads/t/thread.t 2006-07-11 02:27:25.000000000 -0700
@@ -171,7 +171,7 @@
 
 # bugid #24165
 
-run_perl(prog => 'use threads 1.35;
+run_perl(prog => 'use threads 1.36;
                   sub a{threads->create(shift)} $t = a sub{};
                   $t->tid; $t->join; $t->tid',
                   nolib => ($ENV{PERL_CORE}) ? 0 : 1,

==== //depot/perl/ext/threads/threads.pm#65 (xtext) ====
Index: perl/ext/threads/threads.pm
--- perl/ext/threads/threads.pm#64~28529~       2006-07-10 07:04:00.000000000 
-0700
+++ perl/ext/threads/threads.pm 2006-07-11 02:27:25.000000000 -0700
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.35';
+our $VERSION = '1.36';
 my $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
@@ -113,7 +113,7 @@
 
 =head1 VERSION
 
-This document describes threads version 1.35
+This document describes threads version 1.36
 
 =head1 SYNOPSIS
 
@@ -804,7 +804,7 @@
 L<http://www.cpanforum.com/dist/threads>
 
 Annotated POD for L<threads>:
-L<http://annocpan.org/~JDHEDDEN/threads-1.35/threads.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-1.36/threads.pm>
 
 L<threads::shared>, L<perlthrtut>
 

==== //depot/perl/ext/threads/threads.xs#114 (xtext) ====
Index: perl/ext/threads/threads.xs
--- perl/ext/threads/threads.xs#113~28529~      2006-07-10 07:04:00.000000000 
-0700
+++ perl/ext/threads/threads.xs 2006-07-11 02:27:25.000000000 -0700
@@ -1079,7 +1079,7 @@
         /* Set the signal for the thread */
         thread = SV_to_ithread(aTHX_ ST(0));
         MUTEX_LOCK(&thread->mutex);
-        {
+        if (thread->interp) {
             dTHXa(thread->interp);
             PL_psig_pend[signal]++;
             PL_sig_pending = 1;
End of Patch.

Reply via email to