From 18b2f4a8da3216270231fbb23a7d52c0d6b703c8 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 21 Oct 2014 03:00:09 -0700 Subject: [PATCH] lib: On Mac, count ScreenSaverEngine as a BOINC process so BOINC screensaver doesn't cause BOINC to suspend tasks because it thinks CPU is busy. --- lib/procinfo_mac.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/procinfo_mac.cpp b/lib/procinfo_mac.cpp index 639a4635cb..e9ddec635e 100644 --- a/lib/procinfo_mac.cpp +++ b/lib/procinfo_mac.cpp @@ -137,6 +137,11 @@ int procinfo_setup(PROC_MAP& pm) { p.swap_size = (double)virtual_mem * 1024.; p.user_time += 60. * (float)hours; p.is_boinc_app = (p.id == pid || strcasestr(p.command, "boinc")); + // Ideally, we should count ScreenSaverEngine.app as a BOINC process + // only if BOINC is set as the screensaver. We could set a flag in + // the client when the get_screensaver_tasks rpc is called, but that + // would not be 100% reliable for several reasons. + if (strcasestr(p.command, "screensaverengine")) p.is_boinc_app = true; p.is_low_priority = (priority <= 12); switch (iBrandID) {