#define NDEBUG
#include <debug.h>
-BOOL STDCALL W32kCleanupForProcess( INT Process );
-
#define LOCK RtlEnterCriticalSection(&ProcessDataLock)
#define UNLOCK RtlLeaveCriticalSection(&ProcessDataLock)
if (pProcessData)
{
//DbgPrint("CsrFreeProcessData pid: %d\n", Pid);
- W32kCleanupForProcess(Pid); //should check if win32k process
+ if (pProcessData->Console)
+ {
+ RtlEnterCriticalSection(&ActiveConsoleLock);
+ RemoveEntryList(&pProcessData->ProcessEntry);
+ RtlLeaveCriticalSection(&ActiveConsoleLock);
+ }
if (pProcessData->HandleTable)
{
for( c = 0; c < pProcessData->HandleTableSize; c++ )
return Status;
}
NtClose( Process );
+ NewProcessData->CtrlDispatcher = Request->Data.CreateProcessRequest.CtrlDispatcher;
+ RtlEnterCriticalSection( &ActiveConsoleLock );
+ InsertHeadList(&NewProcessData->Console->ProcessList, &NewProcessData->ProcessEntry);
+ RtlLeaveCriticalSection( &ActiveConsoleLock );
}
else Reply->Data.CreateProcessReply.OutputHandle = Reply->Data.CreateProcessReply.InputHandle = INVALID_HANDLE_VALUE;