Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
b92c82c9
Commit
b92c82c9
authored
11 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
server: Add support for NtTerminateProcess(0).
parent
c5fbb4a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/kernel32/tests/loader.c
+3
-14
3 additions, 14 deletions
dlls/kernel32/tests/loader.c
dlls/ntdll/process.c
+1
-1
1 addition, 1 deletion
dlls/ntdll/process.c
server/process.c
+8
-4
8 additions, 4 deletions
server/process.c
with
12 additions
and
19 deletions
dlls/kernel32/tests/loader.c
+
3
−
14
View file @
b92c82c9
...
...
@@ -1105,12 +1105,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
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
(
expected_code
==
STILL_ACTIVE
||
expected_code
==
196
)
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
else
todo_wine
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
}
if
(
test_dll_phase
==
2
)
...
...
@@ -1230,7 +1225,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
status
=
pNtTerminateProcess
(
0
,
195
);
todo_wine
ok
(
!
status
,
"NtTerminateProcess error %#x
\n
"
,
status
);
ret
=
pRtlDllShutdownInProgress
();
...
...
@@ -1239,7 +1233,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
break
;
case
1
:
case
2
:
/* ExitProc
c
es will be called by PROCESS_DETACH handler */
case
2
:
/* ExitProce
s
s will be called by PROCESS_DETACH handler */
ret
=
pRtlDllShutdownInProgress
();
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
...
...
@@ -1283,12 +1277,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
trace
(
"child: 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
(
expected_code
==
STILL_ACTIVE
||
expected_code
==
196
)
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
else
todo_wine
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
ok
(
code
==
expected_code
,
"expected thread exit code %u, got %u
\n
"
,
expected_code
,
code
);
}
*
child_failures
=
winetest_get_failures
();
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/process.c
+
1
−
1
View file @
b92c82c9
...
...
@@ -60,7 +60,7 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
self
=
!
ret
&&
reply
->
self
;
}
SERVER_END_REQ
;
if
(
self
)
exit
(
exit_code
);
if
(
self
&&
handle
)
exit
(
exit_code
);
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
server/process.c
+
8
−
4
View file @
b92c82c9
...
...
@@ -1082,12 +1082,16 @@ DECL_HANDLER(terminate_process)
{
struct
process
*
process
;
if
(
(
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_TERMINATE
))
)
if
(
req
->
handle
)
{
reply
->
self
=
(
current
->
process
==
process
);
terminate_process
(
process
,
current
,
req
->
exit_code
);
release_object
(
process
);
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_TERMINATE
);
if
(
!
process
)
return
;
}
else
process
=
(
struct
process
*
)
grab_object
(
current
->
process
);
reply
->
self
=
(
current
->
process
==
process
);
terminate_process
(
process
,
current
,
req
->
exit_code
);
release_object
(
process
);
}
/* fetch information about a process */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment