From 16e90bb8ca93b074bd32c606405261ffa23318fc Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 26 Jan 2008 16:50:31 +0000 Subject: [PATCH] - Revert 32007 by Alex's request. Explanations in the ros-dev mailing list. svn path=/trunk/; revision=32016 --- reactos/ntoskrnl/dbgk/dbgkobj.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/reactos/ntoskrnl/dbgk/dbgkobj.c b/reactos/ntoskrnl/dbgk/dbgkobj.c index dfbf81debb1..841507fe44d 100644 --- a/reactos/ntoskrnl/dbgk/dbgkobj.c +++ b/reactos/ntoskrnl/dbgk/dbgkobj.c @@ -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 */