changeset 55941:ced62a6a7bbe

8220175: serviceability/dcmd/framework/VMVersionTest.java fails with a timeout Reviewed-by: sspitsyn, cjplummer
author dtitov
date Thu, 20 Jun 2019 18:47:44 -0700
parents de3484367466
children 81ac9262e63b a3e3f3caf284
files src/hotspot/os/linux/perfMemory_linux.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/os/linux/perfMemory_linux.cpp	Thu Jun 20 14:24:13 2019 -0700
+++ b/src/hotspot/os/linux/perfMemory_linux.cpp	Thu Jun 20 18:47:44 2019 -0700
@@ -661,7 +661,7 @@
   if (fp) {
     int pid, nspid;
     int ret;
-    while (!feof(fp)) {
+    while (!feof(fp) && !ferror(fp)) {
       ret = fscanf(fp, "NSpid: %d %d", &pid, &nspid);
       if (ret == 1) {
         break;