Set the process exit status.
authorHartmut Birr <osexpert@googlemail.com>
Fri, 12 Aug 2005 12:10:33 +0000 (12:10 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Fri, 12 Aug 2005 12:10:33 +0000 (12:10 +0000)
svn path=/trunk/; revision=17322

reactos/ntoskrnl/ps/kill.c

index a4f2e7b..be6a46e 100644 (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) {