RFR: 8268361: Fix the infinite loop in next_line [v5]

UncleNine github.com+1964054+unclenine at openjdk.java.net
Mon Jun 14 14:14:55 UTC 2021


On Fri, 11 Jun 2021 06:10:22 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Would it not be better to read the whole content of /proc/stat with a single read() call instead of line by line? I don't think proc fs guarantees any kind of consistency with separate reads.

yes, so fgetc's return value should need to be checked

-------------

PR: https://git.openjdk.java.net/jdk/pull/4378


More information about the serviceability-dev mailing list