From: Gisle Aas Date: Wed, 5 Jan 2005 01:09:51 +0000 (-0800) Subject: Avoid segfault when pthread_key_create fails X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=142c4186a0973c440f5caa0dda3e33e9e6ae7c11;p=p5sagit%2Fp5-mst-13.2.git Avoid segfault when pthread_key_create fails Message-ID: p4raw-id: //depot/perl@23749 --- diff --git a/thread.h b/thread.h index 93062c5..5de28fb 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