Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bfcdf6df
Commit
bfcdf6df
authored
May 13, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Terminate threads before unloading DLLs on process exit.
parent
7ad43e4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
process.c
dlls/kernel32/process.c
+2
-0
loader.c
dlls/kernel32/tests/loader.c
+0
-22
No files found.
dlls/kernel32/process.c
View file @
bfcdf6df
...
...
@@ -2631,6 +2631,7 @@ __ASM_STDCALL_FUNC( ExitProcess, 4, /* Shrinker depend on this particular ExitPr
void
WINAPI
process_ExitProcess
(
DWORD
status
)
{
RtlAcquirePebLock
();
NtTerminateProcess
(
0
,
status
);
LdrShutdownProcess
();
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
exit
(
status
);
...
...
@@ -2641,6 +2642,7 @@ void WINAPI process_ExitProcess( DWORD status )
void
WINAPI
ExitProcess
(
DWORD
status
)
{
RtlAcquirePebLock
();
NtTerminateProcess
(
0
,
status
);
LdrShutdownProcess
();
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
exit
(
status
);
...
...
dlls/kernel32/tests/loader.c
View file @
bfcdf6df
...
...
@@ -1225,19 +1225,11 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
if
(
expected_code
!=
STILL_ACTIVE
)
{
ret
=
WaitForSingleObject
(
attached_thread
[
i
],
1000
);
/* FIXME: remove once Wine is fixed */
if
(
test_dll_phase
==
1
)
todo_wine
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
else
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
}
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
trace
(
"dll: GetExitCodeThread(%u) => %d,%u
\n
"
,
i
,
ret
,
code
);
ok
(
ret
==
1
,
"GetExitCodeThread returned %d, expected 1
\n
"
,
ret
);
/* FIXME: remove once Wine is fixed */
if
(
test_dll_phase
==
1
)
todo_wine
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
else
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
}
...
...
@@ -1248,13 +1240,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
if
(
expected_code
==
STILL_ACTIVE
)
ok
(
ret
==
WAIT_TIMEOUT
,
"expected WAIT_TIMEOUT, got %#x
\n
"
,
ret
);
else
{
/* FIXME: remove once Wine is fixed */
if
(
test_dll_phase
==
1
)
todo_wine
ok
(
ret
==
WAIT_ABANDONED
,
"expected WAIT_ABANDONED, got %#x
\n
"
,
ret
);
else
ok
(
ret
==
WAIT_ABANDONED
,
"expected WAIT_ABANDONED, got %#x
\n
"
,
ret
);
}
/* semaphore is not abandoned on thread termination */
ret
=
WaitForSingleObject
(
semaphore
,
0
);
...
...
@@ -1270,16 +1256,8 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
else
{
ret
=
WaitForSingleObject
(
attached_thread
[
0
],
0
);
/* FIXME: remove once Wine is fixed */
if
(
test_dll_phase
==
1
)
todo_wine
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
else
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
ret
=
WaitForSingleObject
(
attached_thread
[
1
],
0
);
/* FIXME: remove once Wine is fixed */
if
(
test_dll_phase
==
1
)
todo_wine
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
else
ok
(
ret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %#x
\n
"
,
ret
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment