diff --git a/src/util.cc b/src/util.cc index 483f4a6250..ef5f103305 100644 --- a/src/util.cc +++ b/src/util.cc @@ -647,6 +647,8 @@ int ParseCPUFromCGroup() { readCount(cpu->second + "/cpu.cfs_period_us"); if (!period.second) return -1; + if (period.first == 0) + return -1; return quota.first / period.first; } #endif