summaryrefslogtreecommitdiff
path: root/win32/win32thread.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-07-05 00:42:49 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-07-05 00:42:49 +0000
commit50dd6e574ff39b609595ddb16b2fe9f625a26f8c (patch)
tree75623d7252059f79bb9271a8ea59619aaee0be4f /win32/win32thread.h
parentd3a7fa0a676f35fac595b7197c9c94e498857827 (diff)
downloadperl-50dd6e574ff39b609595ddb16b2fe9f625a26f8c.tar.gz
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
Diffstat (limited to 'win32/win32thread.h')
-rw-r--r--win32/win32thread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/win32/win32thread.h b/win32/win32thread.h
index 1f8840c0c0..7105eca2e5 100644
--- a/win32/win32thread.h
+++ b/win32/win32thread.h
@@ -180,6 +180,8 @@ END_EXTERN_C
TlsFree(PL_thr_key); \
} STMT_END
+#define PTHREAD_ATFORK(prepare,parent,child) NOOP
+
#if defined(USE_RTL_THREAD_API) && !defined(_MSC_VER)
#define JOIN(t, avp) \
STMT_START { \