diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-07 10:18:55 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-07 10:18:55 +0000 |
commit | 272b464812029afc110beaa16e04de471ae4febe (patch) | |
tree | be4476907cf8bc7004dba93c03549977a2963380 /ext/Thread | |
parent | af765ed964910199c863914b3f29c369249fd5de (diff) | |
download | perl-272b464812029afc110beaa16e04de471ae4febe.tar.gz |
prohibit thread join()ing itself (from Dan Sugalski)
p4raw-id: //depot/perl@3645
Diffstat (limited to 'ext/Thread')
-rw-r--r-- | ext/Thread/Thread.xs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs index f8b544da91..5d61941241 100644 --- a/ext/Thread/Thread.xs +++ b/ext/Thread/Thread.xs @@ -353,6 +353,8 @@ join(t) int i = NO_INIT PPCODE: #ifdef USE_THREADS + if (t == thr) + croak("Attempt to join self"); DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: joining %p (state %u)\n", thr, t, ThrSTATE(t));); MUTEX_LOCK(&t->mutex); |