From 65c59875e12898931215beca3f6d1a09525f8ef5 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Fri, 12 Aug 2005 12:10:33 +0000 Subject: [PATCH] Set the process exit status. svn path=/trunk/; revision=17322 --- reactos/ntoskrnl/ps/kill.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index a4f2e7be68f..be6a46e5534 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -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) {