- Revert 32007 by Alex's request. Explanations in the ros-dev mailing list.

svn path=/trunk/; revision=32016
This commit is contained in:
Aleksey Bragin 2008-01-26 16:50:31 +00:00
parent 57d135db9d
commit 16e90bb8ca

View file

@ -1063,17 +1063,6 @@ DbgkpDeleteObject(IN PVOID DebugObject)
ASSERT(IsListEmpty(&((PDEBUG_OBJECT)DebugObject)->EventList));
}
VOID
NTAPI
DbgkpDelayedTerminateProcess(PVOID Arg)
{
PWORK_QUEUE_ITEM WorkItem = (PWORK_QUEUE_ITEM)Arg;
PEPROCESS OwnerProcess = *((PEPROCESS *)&WorkItem[1]);
ExFreePool(WorkItem);
/* Terminate the process */
PsTerminateProcess(OwnerProcess, STATUS_DEBUGGER_INACTIVE);
}
VOID
NTAPI
DbgkpCloseObject(IN PEPROCESS OwnerProcess OPTIONAL,
@ -1140,16 +1129,8 @@ DbgkpCloseObject(IN PEPROCESS OwnerProcess OPTIONAL,
/* Check if we terminate on exit */
if (DebugObject->KillProcessOnExit)
{
PWORK_QUEUE_ITEM WorkItem =
ExAllocatePool
(NonPagedPool,
sizeof(WORK_QUEUE_ITEM) + sizeof(PVOID));
ExInitializeWorkItem
(WorkItem,
DbgkpDelayedTerminateProcess,
WorkItem);
*((PEPROCESS *)&WorkItem[1]) = OwnerProcess;
ExQueueWorkItem(WorkItem, CriticalWorkQueue);
/* Terminate the process */
PsTerminateProcess(OwnerProcess, STATUS_DEBUGGER_INACTIVE);
}
/* Dereference the debug object */