Sandbox Violation on Runtime Exec

Marco Dinacci marco.dinacci at gmail.com
Fri Jun 8 08:45:28 PDT 2012


Hi,

>> BTW, it seems Runtime.exec() uses fork() on OSX so AFAIK it may never
>> work in a sandbox.
>> The reason why NSTask works is probably because internally it uses posix_spawn.

In the light of this, I wonder if this behaviour should be filed as a
bug. There is currently no (Java only) way to create a child process
if the parent is executed inside a sandbox, any call to
Runtime.getRuntime().exec() or ProcessBuilder start() will fail.
I think the OpenJDK on OSX should use either posix_spawn or NSTask.


Best,
Marco


More information about the macosx-port-dev mailing list