[8u60] RFR: 8078470: [Linux] Replace syscall use in os::fork_and_exec with glibc fork() and execve()
david.holmes at oracle.com
Thu Apr 23 06:40:31 UTC 2015
For historical reasons, dating back to LinuxThreads, os::fork_and_exec
uses direct syscalls to perform fork and execve functions. The fork
syscall has been deprecated on linux for quite some time and some
distributions are now shipping with deprecated syscalls removed - this
results in a ENOSYS error and the "OnError" commands that utilize
os::fork_and_exec no longer work.
The problem was discussed here:
It seems the concerns surrounding direct use of glibc fork() and exec()
are no longer legitimate and Martin Buchholz reports that Google
replaced the syscalls with glibc calls some time ago and have not had
any problems. So we propose to apply the same change uniformly on Linux.
This is initially going into 8u60 via jdk8u-hs-dev due to time
constraints on the 8u60 schedule, and an internal limitation preventing
me from pushing this to 9 right now. But it will be "backported" to 9 ASAP.
More information about the hotspot-dev