Thanks, Michael I'm hoping the following will placate sun studio cc:
diff --git a/src/solaris/native/java/lang/UNIXProcess_md.c b/src/solaris/native/java/lang/UNIXProcess_md.c --- a/src/solaris/native/java/lang/UNIXProcess_md.c +++ b/src/solaris/native/java/lang/UNIXProcess_md.c @@ -651,6 +651,7 @@ } close(FAIL_FILENO); _exit(-1); + return 0; /* Suppress warning "no return value from function" */ } I'm also adding my manual test case BigFork.java. It may be helpful while implementing the Solaris version of this feature. webrev updated. I need a Sun bug to commit these changes for Linux. Please create one. Synopsis: * (process) Use clone(CLONE_VM), not fork, on Linux to avoid swap exhaustion <http://bugs.sun.com/view_bug.do?bug_id=5049299>* Description: On Linux it is possible to use clone with CLONE_VM, but not CLONE_THREAD, which is like fork() but much cheaper and avoids swap exhaustion due to momentary overcommit of swap space. One has to be very careful in this case to not mutate global variables such as environ, but it's worth it. Evaluation: Make it so. See also: 5049299 Once that is done, I will commit my changes. Thanks, Martin On Thu, Jun 11, 2009 at 07:22, Michael McMahon <michael.mcma...@sun.com>wrote: > Martin Buchholz wrote: > >> I broke down and finally created a "proper" webrev, >> just like the good old days. >> >> >> http://cr.openjdk.java.net/~martin/clone-exec/<http://cr.openjdk.java.net/%7Emartin/clone-exec/>< >> http://cr.openjdk.java.net/%7Emartin/clone-exec/> >> >> I've run the regression tests on Solaris and Linux and they seem fine. > There is a compile warning on solaris at line 654: no return value from > function. > Aside from that, I'm happy with the change now > > - Michael. >