Handles should be closed in the context of the dead process, not the system process.

For now, I just used KeAttachProcess() to do this, but this should be moved so it is called by the last thread of the process before it dies.

svn path=/trunk/; revision=2004
This commit is contained in:
Phillip Susi 2001-06-23 19:15:14 +00:00
parent 71f7e0cad5
commit db9f10747e

View file

@ -209,8 +209,9 @@ PiTerminateProcess(PEPROCESS Process, NTSTATUS ExitStatus)
{ {
return(STATUS_SUCCESS); return(STATUS_SUCCESS);
} }
KeAttachProcess( Process );
ObCloseAllHandles(Process); ObCloseAllHandles(Process);
KeDetachProcess();
KeAcquireDispatcherDatabaseLock(FALSE); KeAcquireDispatcherDatabaseLock(FALSE);
Process->Pcb.DispatcherHeader.SignalState = TRUE; Process->Pcb.DispatcherHeader.SignalState = TRUE;
KeDispatcherObjectWake(&Process->Pcb.DispatcherHeader); KeDispatcherObjectWake(&Process->Pcb.DispatcherHeader);