mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 23:24:01 +00:00
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:
parent
537f82fd1a
commit
32ea00da50
1 changed files with 2 additions and 0 deletions
|
@ -187,6 +187,8 @@ NTSTATUS STDCALL PiTerminateProcess(PEPROCESS Process,
|
||||||
Process->Pcb.DispatcherHeader.SignalState = TRUE;
|
Process->Pcb.DispatcherHeader.SignalState = TRUE;
|
||||||
KeDispatcherObjectWake(&Process->Pcb.DispatcherHeader);
|
KeDispatcherObjectWake(&Process->Pcb.DispatcherHeader);
|
||||||
KeReleaseDispatcherDatabaseLock(FALSE);
|
KeReleaseDispatcherDatabaseLock(FALSE);
|
||||||
|
if( PsGetCurrentThread()->ThreadsProcess == Process )
|
||||||
|
PsTerminateCurrentThread( ExitStatus );
|
||||||
DPRINT("RC %d\n", ObGetReferenceCount(Process));
|
DPRINT("RC %d\n", ObGetReferenceCount(Process));
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue