perl built with USE_ITHREADS can deadlock during fork() or backticks
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 5 Jul 2001 00:42:49 +0000 (00:42 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 5 Jul 2001 00:42:49 +0000 (00:42 +0000)
commit50dd6e574ff39b609595ddb16b2fe9f625a26f8c
tree75623d7252059f79bb9271a8ea59619aaee0be4f
parentd3a7fa0a676f35fac595b7197c9c94e498857827
perl built with USE_ITHREADS can deadlock during fork() or backticks
since it doesn't ensure threads other than the one calling fork()
aren't holding any locks; the fix is to use pthread_atfork() to
hold global locks

building perl with -Dusemymalloc exacerbates the problem since
Perl_malloc() holds a mutex, and perl's exec() calls New()

XXX the code in win32thread.h may be needed on platforms that have
no pthread_atfork()

p4raw-id: //depot/perl@11151
perl.c
thread.h
win32/win32thread.h