mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 12:41:54 +00:00
- Patch by hto: Do not wait until process is closed with process database locked. See Bug 3805.
svn path=/trunk/; revision=36948
This commit is contained in:
parent
6d2f6893bc
commit
bb641e28cb
1 changed files with 6 additions and 4 deletions
|
@ -130,6 +130,7 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||||
ULONG hash;
|
ULONG hash;
|
||||||
UINT c;
|
UINT c;
|
||||||
PCSRSS_PROCESS_DATA pProcessData, *pPrevLink;
|
PCSRSS_PROCESS_DATA pProcessData, *pPrevLink;
|
||||||
|
HANDLE Process;
|
||||||
|
|
||||||
hash = ((ULONG_PTR)Pid >> 2) % (sizeof(ProcessData) / sizeof(*ProcessData));
|
hash = ((ULONG_PTR)Pid >> 2) % (sizeof(ProcessData) / sizeof(*ProcessData));
|
||||||
pPrevLink = &ProcessData[hash];
|
pPrevLink = &ProcessData[hash];
|
||||||
|
@ -144,10 +145,7 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||||
if (pProcessData)
|
if (pProcessData)
|
||||||
{
|
{
|
||||||
DPRINT("CsrFreeProcessData pid: %d\n", Pid);
|
DPRINT("CsrFreeProcessData pid: %d\n", Pid);
|
||||||
if (pProcessData->Process)
|
Process = pProcessData->Process;
|
||||||
{
|
|
||||||
NtClose(pProcessData->Process);
|
|
||||||
}
|
|
||||||
if (pProcessData->HandleTable)
|
if (pProcessData->HandleTable)
|
||||||
{
|
{
|
||||||
for (c = 0; c < pProcessData->HandleTableSize; c++)
|
for (c = 0; c < pProcessData->HandleTableSize; c++)
|
||||||
|
@ -177,6 +175,10 @@ NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
|
||||||
|
|
||||||
RtlFreeHeap(CsrssApiHeap, 0, pProcessData);
|
RtlFreeHeap(CsrssApiHeap, 0, pProcessData);
|
||||||
UNLOCK;
|
UNLOCK;
|
||||||
|
if (Process)
|
||||||
|
{
|
||||||
|
NtClose(Process);
|
||||||
|
}
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue