From 4013f13cb821c9544810f113f80275930f940eba Mon Sep 17 00:00:00 2001 From: Johnny Hunter <88464667+hackyhunter@users.noreply.github.com> Date: Fri, 25 Sep 2026 17:21:49 -0700 Subject: [PATCH] Return every process instead of stopping at 1024 GetRawProcessList stopped reading the toolhelp snapshot after 1024 processes. The limit protected the fixed-size process_info array (592c945, #9). Since #67 the list is a std::vector that grows with push_back, so the limit no longer prevents an overflow and only drops processes. The snapshot lists them in creation order, so the ones dropped are the newest: a process the caller just started and its children. --- src/process.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/process.cc b/src/process.cc index ad63727..1998f4a 100644 --- a/src/process.cc +++ b/src/process.cc @@ -37,7 +37,7 @@ uint32_t GetRawProcessList(std::vector& process_info, process_info.push_back(std::move(pinfo)); process_count++; } - } while (process_count < 1024 && Process32Next(snapshot_handle, &process_entry)); + } while (Process32Next(snapshot_handle, &process_entry)); } CloseHandle(snapshot_handle);