hotspot/src/share/vm/utilities/vmError.cpp
changeset 30745 8ebe80838174
parent 30622 648d51c142bd
child 30773 3f15e2dc056b
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Tue May 12 13:17:54 2015 -0700
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Tue May 12 20:55:40 2015 -0400
@@ -1062,7 +1062,9 @@
       out.print_raw   (cmd);
       out.print_raw_cr("\" ...");
 
-      os::fork_and_exec(cmd);
+      if (os::fork_and_exec(cmd) < 0) {
+        out.print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
+      }
     }
 
     // done with OnError
@@ -1147,7 +1149,9 @@
 #endif
     tty->print_cr("\"%s\"...", cmd);
 
-    os::fork_and_exec(cmd);
+    if (os::fork_and_exec(cmd) < 0) {
+      tty->print_cr("os::fork_and_exec failed: %s (%d)", strerror(errno), errno);
+    }
   }
 }