From 4e663a7c286a0be9b6e28091269178aad8d3c50a Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Mon, 21 Jul 2008 12:14:23 +0000 Subject: [PATCH] - Include a "System Idle Process" as the first item in QSI SystemProcessInformation. svn path=/trunk/; revision=34635 --- reactos/ntoskrnl/ex/sysinfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 960b8b59227..1f6665f80fe 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -717,7 +717,7 @@ QSI_DEF(SystemProcessInformation) } RtlZeroMemory(Spi, Size); - syspr = PsGetNextProcess(NULL); + syspr = PsIdleProcess; pr = syspr; pCur = (unsigned char *)Spi; @@ -813,6 +813,9 @@ QSI_DEF(SystemProcessInformation) current_entry = current_entry->Flink; } + /* Handle idle process entry */ + if (pr == PsIdleProcess) pr = NULL; + pr = PsGetNextProcess(pr); nThreads = 0; if ((pr == syspr) || (pr == NULL))