solaris - How to Use posix_spawn() in Java -
i've inherited legacy application uses processbuilder.start() execute script on solaris 10 server.
unfortunately, script call fails due memory issue, documented here
oracle's recommendation use posix_spawn() since, under covers, processbuilder.start() using fork/exec.
i have been unable find examples (e.g., how call "myscript.sh")
using posix_spawn() in java, or packages required.
could please, point me simple example on how use posix_spawn() in java?
you need familiarize jni first. learn how call out native routine java code. once - can @ this example , see if helps issue. of particular interest is:
if( (rc=posix_spawn(&pid, spawnedargs[0], null, null, spawnedargs, null)) !=0 ){ printf("error while executing posix_spawn(), return code posix_spawn()=%d",rc); }
Comments
Post a Comment