mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
kernel32: Hold PEB lock during process exit.
This commit is contained in:
parent
bac0387d29
commit
77f222505c
2 changed files with 2 additions and 2 deletions
|
@ -2630,6 +2630,7 @@ __ASM_STDCALL_FUNC( ExitProcess, 4, /* Shrinker depend on this particular ExitPr
|
|||
|
||||
void WINAPI process_ExitProcess( DWORD status )
|
||||
{
|
||||
RtlAcquirePebLock();
|
||||
LdrShutdownProcess();
|
||||
NtTerminateProcess(GetCurrentProcess(), status);
|
||||
exit(status);
|
||||
|
@ -2639,6 +2640,7 @@ void WINAPI process_ExitProcess( DWORD status )
|
|||
|
||||
void WINAPI ExitProcess( DWORD status )
|
||||
{
|
||||
RtlAcquirePebLock();
|
||||
LdrShutdownProcess();
|
||||
NtTerminateProcess(GetCurrentProcess(), status);
|
||||
exit(status);
|
||||
|
|
|
@ -1872,7 +1872,6 @@ static void test_ExitProcess(void)
|
|||
ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||
ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError());
|
||||
ret = WaitForSingleObject(pi.hProcess, 5000);
|
||||
todo_wine
|
||||
ok(ret == WAIT_TIMEOUT, "child process should fail to terminate\n");
|
||||
if (ret != WAIT_OBJECT_0)
|
||||
{
|
||||
|
@ -1882,7 +1881,6 @@ todo_wine
|
|||
ret = WaitForSingleObject(pi.hProcess, 1000);
|
||||
ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n");
|
||||
GetExitCodeProcess(pi.hProcess, &ret);
|
||||
todo_wine
|
||||
ok(ret == 199, "expected exit code 199, got %u\n", ret);
|
||||
if (*child_failures)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue