8220175: serviceability/dcmd/framework/VMVersionTest.java fails with a timeout
authordtitov
Thu, 20 Jun 2019 18:47:44 -0700
changeset 55457 ced62a6a7bbe
parent 55456 de3484367466
child 55458 81ac9262e63b
child 55464 a3e3f3caf284
8220175: serviceability/dcmd/framework/VMVersionTest.java fails with a timeout Reviewed-by: sspitsyn, cjplummer
src/hotspot/os/linux/perfMemory_linux.cpp
--- 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;