NtTerminateProcess did not terminate the current thread if it was a member of the process being terminated

svn path=/trunk/; revision=1140
This commit is contained in:
Phillip Susi 2000-04-28 17:29:42 +00:00
parent 537f82fd1a
commit 32ea00da50

View file

@ -187,6 +187,8 @@ NTSTATUS STDCALL PiTerminateProcess(PEPROCESS Process,
Process->Pcb.DispatcherHeader.SignalState = TRUE;
KeDispatcherObjectWake(&Process->Pcb.DispatcherHeader);
KeReleaseDispatcherDatabaseLock(FALSE);
if( PsGetCurrentThread()->ThreadsProcess == Process )
PsTerminateCurrentThread( ExitStatus );
DPRINT("RC %d\n", ObGetReferenceCount(Process));
return(STATUS_SUCCESS);
}