8078470: [Linux] Replace syscall use in os::fork_and_exec with glibc fork() and execve()

Reviewed-by: stuefe, dsamersoff, dcubed
This commit is contained in:
David Holmes 2015-05-12 20:55:40 -04:00
parent 971e022093
commit 5c859405b5
4 changed files with 144 additions and 26 deletions

View file

@ -1062,7 +1062,9 @@ void VMError::report_and_die() {
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 @@ void VM_ReportJavaOutOfMemory::doit() {
#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);
}
}
}