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
b92c82c9
Commit
b92c82c9
authored
Apr 15, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add support for NtTerminateProcess(0).
parent
c5fbb4a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
+8
-15
loader.c
dlls/kernel32/tests/loader.c
+1
-12
process.c
dlls/ntdll/process.c
+1
-1
process.c
server/process.c
+6
-2
No files found.
dlls/kernel32/tests/loader.c
View file @
b92c82c9
...
@@ -1105,11 +1105,6 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
...
@@ -1105,11 +1105,6 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
trace
(
"dll: GetExitCodeThread(%u) => %d,%u
\n
"
,
i
,
ret
,
code
);
trace
(
"dll: GetExitCodeThread(%u) => %d,%u
\n
"
,
i
,
ret
,
code
);
ok
(
ret
==
1
,
"GetExitCodeThread returned %d, expected 1
\n
"
,
ret
);
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
);
}
}
...
@@ -1230,7 +1225,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
...
@@ -1230,7 +1225,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
status
=
pNtTerminateProcess
(
0
,
195
);
status
=
pNtTerminateProcess
(
0
,
195
);
todo_wine
ok
(
!
status
,
"NtTerminateProcess error %#x
\n
"
,
status
);
ok
(
!
status
,
"NtTerminateProcess error %#x
\n
"
,
status
);
ret
=
pRtlDllShutdownInProgress
();
ret
=
pRtlDllShutdownInProgress
();
...
@@ -1239,7 +1233,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
...
@@ -1239,7 +1233,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
break
;
break
;
case
1
:
case
1
:
case
2
:
/* ExitProc
ce
s will be called by PROCESS_DETACH handler */
case
2
:
/* ExitProc
es
s will be called by PROCESS_DETACH handler */
ret
=
pRtlDllShutdownInProgress
();
ret
=
pRtlDllShutdownInProgress
();
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
ok
(
!
ret
,
"RtlDllShutdownInProgress returned %d
\n
"
,
ret
);
...
@@ -1283,11 +1277,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
...
@@ -1283,11 +1277,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
ret
=
GetExitCodeThread
(
attached_thread
[
i
],
&
code
);
trace
(
"child: GetExitCodeThread(%u) => %d,%u
\n
"
,
i
,
ret
,
code
);
trace
(
"child: GetExitCodeThread(%u) => %d,%u
\n
"
,
i
,
ret
,
code
);
ok
(
ret
==
1
,
"GetExitCodeThread returned %d, expected 1
\n
"
,
ret
);
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
);
}
}
...
...
dlls/ntdll/process.c
View file @
b92c82c9
...
@@ -60,7 +60,7 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
...
@@ -60,7 +60,7 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
self
=
!
ret
&&
reply
->
self
;
self
=
!
ret
&&
reply
->
self
;
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
if
(
self
)
exit
(
exit_code
);
if
(
self
&&
handle
)
exit
(
exit_code
);
return
ret
;
return
ret
;
}
}
...
...
server/process.c
View file @
b92c82c9
...
@@ -1082,12 +1082,16 @@ DECL_HANDLER(terminate_process)
...
@@ -1082,12 +1082,16 @@ DECL_HANDLER(terminate_process)
{
{
struct
process
*
process
;
struct
process
*
process
;
if
(
(
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_TERMINATE
))
)
if
(
req
->
handle
)
{
{
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
);
reply
->
self
=
(
current
->
process
==
process
);
terminate_process
(
process
,
current
,
req
->
exit_code
);
terminate_process
(
process
,
current
,
req
->
exit_code
);
release_object
(
process
);
release_object
(
process
);
}
}
}
/* fetch information about a process */
/* fetch information about a process */
...
...
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