ops4j / org.ops4j.pax.runner

Multi Framework OSGi Runner
http://team.ops4j.org/wiki/display/paxrunner/
47 stars 39 forks source link

The run.sh script output from --executor=zip should use "exec java" instead of "java" to support capturing the java pid. [PAXRUNNER-402] #412

Open ops4j-issues opened 13 years ago

ops4j-issues commented 13 years ago

Brandon Ehle created PAXRUNNER-402

The run.sh generating is nice, but there is one hiccup for using this to run java from an init script. The current run.sh causes java to fork off as a separate process and scripts that attempt to capture the process id from the java script are instead capturing the process id from the bash shell.

If you modify the run.sh script to use "exec java" instead of just "java" to execute the script, the java instance will replace the current bash script instead of being run as a child of it. This allows calling scripts to be able to capture the process id of the java process to be able to stop and start the JVM correctly on system startup and shutdown.


Votes: 0, Watches: 0