From: Jerry D. Hedden Date: Mon, 10 Jul 2006 13:28:25 +0000 (-0700) Subject: threads 1.36 - Signalling terminated threads core dumps X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ceb02cdefdcbba303bf67775d885ec9818e651f;p=p5sagit%2Fp5-mst-13.2.git threads 1.36 - Signalling terminated threads core dumps From: "Jerry D. Hedden" Message-ID: <20060710132825.fb30e530d17747c2b054d625b8945d88.5bdc82d2c0.wbe@email.secureserver.net> p4raw-id: //depot/perl@28543 --- diff --git a/ext/threads/Changes b/ext/threads/Changes index 9e15b8b..71d6313 100755 --- a/ext/threads/Changes +++ b/ext/threads/Changes @@ -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 diff --git a/ext/threads/README b/ext/threads/README index c331a36..7269f37 100755 --- a/ext/threads/README +++ b/ext/threads/README @@ -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 @@ To install this module type the following: 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 diff --git a/ext/threads/t/kill.t b/ext/threads/t/kill.t index 5d25db3..aff5dd0 100644 --- a/ext/threads/t/kill.t +++ b/ext/threads/t/kill.t @@ -201,9 +201,11 @@ threads->yield(); 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 diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t index 5982236..d29d523 100644 --- a/ext/threads/t/thread.t +++ b/ext/threads/t/thread.t @@ -171,7 +171,7 @@ package main; # 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, diff --git a/ext/threads/threads.pm b/ext/threads/threads.pm index 0152df5..04e0692 100755 --- a/ext/threads/threads.pm +++ b/ext/threads/threads.pm @@ -5,7 +5,7 @@ use 5.008; use strict; use warnings; -our $VERSION = '1.35'; +our $VERSION = '1.36'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -113,7 +113,7 @@ threads - Perl interpreter-based threads =head1 VERSION -This document describes threads version 1.35 +This document describes threads version 1.36 =head1 SYNOPSIS @@ -804,7 +804,7 @@ L Discussion Forum on CPAN: L Annotated POD for L: -L +L L, L diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 1f3cad1..c648bcd 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -1079,7 +1079,7 @@ ithread_kill(...) /* 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;