From 143d03e318e244c8cd3d0fd5d50ae7310a9153b9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 15 Mar 2010 23:28:23 +0000 Subject: [PATCH] - client: in computing non-BOINC CPU time, exclude any process whose executable includes "boinc", case-insensitive. Fix problem with BoincTasks.exe svn path=/trunk/boinc/; revision=20910 --- checkin_notes | 9 +++++++++ lib/procinfo_unix.cpp | 4 ++-- lib/procinfo_win.cpp | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 739c54147a..25b9224a2e 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1947,3 +1947,12 @@ David 12 Mar 2010 gui_rpc_client_print.cpp gui_rpc_client_ops.cpp gui_rpc_client.h + +David 15 Mar 2010 + - client: in computing non-BOINC CPU time, + exclude any process whose executable includes "boinc", case-insensitive. + Fix problem with BoincTasks.exe + + lib/ + procinfo_unix.cpp + procinfo_win.cpp diff --git a/lib/procinfo_unix.cpp b/lib/procinfo_unix.cpp index fec2e05668..9da763c230 100644 --- a/lib/procinfo_unix.cpp +++ b/lib/procinfo_unix.cpp @@ -206,7 +206,7 @@ int procinfo_setup(vector& pi) { p.page_fault_count = prusage.pr_majf + prusage.pr_minf; } fclose(fd); - p.is_boinc_app = (p.id == pid || strstr(p.command, "boinc")); + p.is_boinc_app = (p.id == pid || strcasestr(p.command, "boinc")); pi.push_back(p); } } @@ -231,7 +231,7 @@ int procinfo_setup(vector& pi) { p.user_time = ps.utime / 100.; p.kernel_time = ps.stime / 100.; strlcpy(p.command, ps.comm, sizeof(p.command)); - p.is_boinc_app = (p.id == pid || strstr(p.command, "boinc")); + p.is_boinc_app = (p.id == pid || strcasestr(p.command, "boinc")); pi.push_back(p); } #endif diff --git a/lib/procinfo_win.cpp b/lib/procinfo_win.cpp index cdf5c8e80f..cbc89692e6 100644 --- a/lib/procinfo_win.cpp +++ b/lib/procinfo_win.cpp @@ -102,7 +102,7 @@ int get_procinfo_XP(vector& pi) { sizeof(p.command), NULL, NULL ); - p.is_boinc_app = (p.id == pid) || (strstr(p.command, "boinc") != NULL); + p.is_boinc_app = (p.id == pid) || (strcasestr(p.command, "boinc") != NULL); pi.push_back(p); if (!pProcesses->NextEntryDelta) { break;