Skip to content

Commit

Permalink
Merge pull request #2174 from lrtfm/patch-1
Browse files Browse the repository at this point in the history
Fixbug: SIGFPE error when cpu.cfs_period_us = 0
  • Loading branch information
jhasse authored Aug 23, 2022
2 parents 864f7b5 + 93403e1 commit b5f521a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5f521a

Please sign in to comment.