Commit 8d1462b6 authored by Alexandre Julliard's avatar Alexandre Julliard

pthread_atfork: don't call critical section functions before

initialization is done.
parent 278b3f0d
...@@ -124,13 +124,13 @@ int __pthread_atfork(void (*prepare)(void), ...@@ -124,13 +124,13 @@ int __pthread_atfork(void (*prepare)(void),
void (*parent)(void), void (*parent)(void),
void (*child)(void)) void (*child)(void))
{ {
EnterCriticalSection( &atfork_section ); if (SystemHeap) EnterCriticalSection( &atfork_section );
assert( atfork_count < MAX_ATFORK ); assert( atfork_count < MAX_ATFORK );
atfork_prepare[atfork_count] = prepare; atfork_prepare[atfork_count] = prepare;
atfork_parent[atfork_count] = parent; atfork_parent[atfork_count] = parent;
atfork_child[atfork_count] = child; atfork_child[atfork_count] = child;
atfork_count++; atfork_count++;
LeaveCriticalSection( &atfork_section ); if (SystemHeap) LeaveCriticalSection( &atfork_section );
return 0; return 0;
} }
strong_alias(__pthread_atfork, pthread_atfork); strong_alias(__pthread_atfork, pthread_atfork);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment