mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
pthread_atfork: don't call critical section functions before
initialization is done.
This commit is contained in:
parent
278b3f0def
commit
8d1462b614
@ -124,13 +124,13 @@ int __pthread_atfork(void (*prepare)(void),
|
||||
void (*parent)(void),
|
||||
void (*child)(void))
|
||||
{
|
||||
EnterCriticalSection( &atfork_section );
|
||||
if (SystemHeap) EnterCriticalSection( &atfork_section );
|
||||
assert( atfork_count < MAX_ATFORK );
|
||||
atfork_prepare[atfork_count] = prepare;
|
||||
atfork_parent[atfork_count] = parent;
|
||||
atfork_child[atfork_count] = child;
|
||||
atfork_count++;
|
||||
LeaveCriticalSection( &atfork_section );
|
||||
if (SystemHeap) LeaveCriticalSection( &atfork_section );
|
||||
return 0;
|
||||
}
|
||||
strong_alias(__pthread_atfork, pthread_atfork);
|
||||
|
Loading…
Reference in New Issue
Block a user