< prev index next >
src/hotspot/share/utilities/vmError.cpp
Print this page
@@ -56,10 +56,14 @@
#ifndef PRODUCT
#include <signal.h>
#endif // PRODUCT
+bool VMError::_vfork_mode = false;
+
+bool VMError::is_forkmode_vfork() { return _vfork_mode; }
+
bool VMError::_error_reported = false;
// call this when the VM is dying--it might loosen some asserts
bool VMError::is_error_reported() { return _error_reported; }
@@ -1563,15 +1567,19 @@
#elif defined(SOLARIS)
tty->print ("/usr/bin/sh -c ");
#endif
tty->print_cr("\"%s\"...", cmd);
+ VMError::_vfork_mode = true;
+
if (os::fork_and_exec(cmd) < 0) {
tty->print_cr("os::fork_and_exec failed: %s (%s=%d)",
os::strerror(errno), os::errno_name(errno), errno);
}
}
+
+ VMError::_vfork_mode = false;
}
void VMError::report_java_out_of_memory(const char* message) {
if (OnOutOfMemoryError && OnOutOfMemoryError[0]) {
MutexLocker ml(Heap_lock);
< prev index next >