Set the process exit status.

svn path=/trunk/; revision=17322
This commit is contained in:
Hartmut Birr 2005-08-12 12:10:33 +00:00
parent ed43d4bddd
commit 65c59875e1

View file

@ -261,6 +261,7 @@ PspExitThread(NTSTATUS ExitStatus)
happens when the last thread just terminates without explicitly
terminating the process. */
CurrentProcess->ExitTime = CurrentThread->ExitTime;
CurrentProcess->ExitStatus = ExitStatus;
}
/* Check if the process has a debug port */
@ -573,6 +574,7 @@ NtTerminateProcess(IN HANDLE ProcessHandle OPTIONAL,
we kill ourselves to prevent threads outside of our process trying
to kill us */
KeQuerySystemTime(&Process->ExitTime);
Process->ExitStatus = ExitStatus;
/* Only master thread remains... kill it off */
if (CurrentThread->ThreadsProcess == Process) {