From: Jarkko Hietaniemi Date: Thu, 12 Jul 2001 23:35:06 +0000 (+0000) Subject: Make PTHREAD_ATFORK() to croak if HAS_FORK, noop otherwise. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de992003099f76a2f2b1df9b7f937a2338296e9a;p=p5sagit%2Fp5-mst-13.2.git Make PTHREAD_ATFORK() to croak if HAS_FORK, noop otherwise. p4raw-id: //depot/perl@11337 --- diff --git a/thread.h b/thread.h index 8f475a0..a82c01b 100644 --- a/thread.h +++ b/thread.h @@ -308,9 +308,15 @@ void Perl_atfork_unlock(void); #ifndef PTHREAD_ATFORK # ifdef HAS_PTHREAD_ATFORK # define PTHREAD_ATFORK(prepare,parent,child) \ - pthread_atfork(prepare,parent,child) + pthread_atfork(prepare,parent,child) # else -# define PTHREAD_ATFORK(prepare,parent,child) +# ifdef HAS_FORK +# define PTHREAD_ATFORK(prepare,parent,child) \ + Perl_croak(aTHX_ "No pthread_atfork() -- fork() too unsafe"); +# else +# define PTHREAD_ATFORK(prepare,parent,child) \ + NOOP +# endif # endif #endif