summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2005-01-04 17:09:51 -0800
committerNicholas Clark <nick@ccl4.org>2005-01-05 11:25:29 +0000
commit142c4186a0973c440f5caa0dda3e33e9e6ae7c11 (patch)
tree82bf42e92b66f99f8209b898947487fc8202db85 /thread.h
parente0261ef804cae9bce7bdbff7f5bafb553b9260f8 (diff)
downloadperl-142c4186a0973c440f5caa0dda3e33e9e6ae7c11.tar.gz
Avoid segfault when pthread_key_create fails
Message-ID: <lracroz1gg.fsf@caliper.activestate.com> p4raw-id: //depot/perl@23749
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread.h b/thread.h
index 93062c5d77..5de28fb419 100644
--- a/thread.h
+++ b/thread.h
@@ -334,8 +334,7 @@
STMT_START { \
int _eC_; \
if ((_eC_ = pthread_key_create(&PL_thr_key, 0))) { \
- PerlIO_printf(PerlIO_stderr(), "panic: pthread_key_create (%d) [%s:%d]", \
- _eC_, __FILE__, __LINE__); \
+ write(2, "panic: pthread_key_create failed\n", 33); \
exit(1); \
} \
} STMT_END