JDK-4227230 : Process creation uses expensive form of fork()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.1.7
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1999-04-06
  • Updated: 1999-05-13
  • Resolved: 1999-05-13

Name: dbT83986			Date: 04/06/99

When creating subprocesses with java.lang.Process, the native code
uses fork(), which is the most inefficient version of fork available.
In this case, we're always forking for the sole purpose of execing
a child process, so vfork() would be a better alternative.

The problem occurs when you run the JDK with a large memory size,
becuase the OS requires that there is enough swap space for another
copy of the JDK, even though it's not going to use it at all (since
it's just going to do an exec).
(Review ID: 56597) 

EVALUATION On Solaris 2.5.1, vfork(2) states: NOTES vfork() is unsafe in multi-thread applications. anand.palaniswamy@Eng 1999-04-09 Closing this out because it won't work on native threads. anand.palaniswamy@Eng 1999-05-13