diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-12 23:35:06 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-12 23:35:06 +0000 |
commit | de992003099f76a2f2b1df9b7f937a2338296e9a (patch) | |
tree | 7b025fc5ea512f2a52a52f434c15a313946458a2 /thread.h | |
parent | 144e72cbb0a87482126af99f2a57642ab7151c4b (diff) | |
download | perl-de992003099f76a2f2b1df9b7f937a2338296e9a.tar.gz |
Make PTHREAD_ATFORK() to croak if HAS_FORK, noop otherwise.
p4raw-id: //depot/perl@11337
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |