ntdll: Set the process detaching flag before calling FLS callbacks.
So that we will not deadlock trying to acquire fls_section. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
32f5dfde0d
commit
16592ca918
|
@ -3182,12 +3182,14 @@ fail:
|
||||||
*/
|
*/
|
||||||
void WINAPI LdrShutdownProcess(void)
|
void WINAPI LdrShutdownProcess(void)
|
||||||
{
|
{
|
||||||
|
BOOL detaching = process_detaching;
|
||||||
|
|
||||||
TRACE("()\n");
|
TRACE("()\n");
|
||||||
|
|
||||||
if (!process_detaching)
|
process_detaching = TRUE;
|
||||||
|
if (!detaching)
|
||||||
RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 1 );
|
RtlProcessFlsData( NtCurrentTeb()->FlsSlots, 1 );
|
||||||
|
|
||||||
process_detaching = TRUE;
|
|
||||||
process_detach();
|
process_detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue