RFR: JDK-8161360,,Deprecated vfork() should not be used on Solaris

Alan Burlison Alan.Burlison at oracle.com
Thu Sep 1 12:45:08 UTC 2016


On 01/09/2016 02:55, Martin Buchholz wrote:

> Does an attempt to use vfork on Solaris result in something reasonable like
> UnsupportedOperationException?

Yes:

$ jshell
|  Welcome to JShell -- Version 9-internal
|  For an introduction type: /help intro


jshell> System.setProperty("jdk.lang.Process.launchMechanism", "VFORK")
$1 ==> null

jshell> Runtime.getRuntime().exec("ls");
|  java.lang.Error thrown: VFORK is not a supported process launch 
mechanism on this platform.
|        at ProcessImpl$Platform.lambda$launchMechanism$0 
(ProcessImpl.java:151)
|        at AccessController.doPrivileged (Native Method)
|        at ProcessImpl$Platform.launchMechanism (ProcessImpl.java:134)
|        at ProcessImpl.<clinit> (ProcessImpl.java:174)
|        at ProcessBuilder.start (ProcessBuilder.java:1107)
|        at ProcessBuilder.start (ProcessBuilder.java:1071)
|        at Runtime.exec (Runtime.java:635)
|        at Runtime.exec (Runtime.java:459)
|        at Runtime.exec (Runtime.java:356)
|        at (#2:1)

jshell>

-- 
Alan Burlison
--


More information about the core-libs-dev mailing list