[SunHELP] Script migration problems

Ben Ricker sunhelp at sunhelp.org
Wed Mar 28 15:55:36 CST 2001


I have a script which I am migrating from Redhat Linux to Solaris 8. The
script launches a java application. Here is the key lines from the
script: 

# Write the PID for this process to the pidfile.
echo $$ > $PIDFILE
 
echo "Starting JVM..."
exec java org.apache.jserv.JServ $PROPERTIES $1 2>> $LOG_FILE &

How this worked on Linux is that the "echo $$ > $PIDFILE" wrote the
shells PID and then the exec statement started the JVM using that same
PID. However, on Solaris, this does not work; I cannot get theright PID
into that file. It does wrtie a PID, just the wrong one. Therefore, it
screws with my ability to restart or stop the JVM using the script.

Any pointers?

Ben Ricker
Systems Administrator
US-Rx, Inc.




More information about the SunHELP mailing list