hotspot/src/share/vm/utilities/vmError.cpp
changeset 37113 5a33bf5089ac
parent 36320 3d35d1e1dfde
child 37466 287c4ebd11b0
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Tue Mar 15 20:37:35 2016 +0000
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Sat Mar 12 08:35:05 2016 +0100
@@ -1260,8 +1260,9 @@
           out.print_raw("#\n# Compiler replay data is saved as:\n# ");
           out.print_raw_cr(buffer);
         } else {
+          int e = errno;
           out.print_raw("#\n# Can't open file to dump replay data. Error: ");
-          out.print_raw_cr(strerror(os::get_last_error()));
+          out.print_raw_cr(os::strerror(e));
         }
       }
     }
@@ -1301,7 +1302,8 @@
       out.print_raw_cr("\" ...");
 
       if (os::fork_and_exec(cmd) < 0) {
-        out.print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
+        out.print_cr("os::fork_and_exec failed: %s (%s=%d)",
+                     os::strerror(errno), os::errno_name(errno), errno);
       }
     }
 
@@ -1359,7 +1361,8 @@
     tty->print_cr("\"%s\"...", cmd);
 
     if (os::fork_and_exec(cmd) < 0) {
-      tty->print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
+      tty->print_cr("os::fork_and_exec failed: %s (%s=%d)",
+                     os::strerror(errno), os::errno_name(errno), errno);
     }
   }
 }