1. Shell script hangs at execution of Java program...
So, my java code appears to run to completion b/c I can see the output
of the last executable line of my Java program in my log file. It
seems to be a case of the Java program not returning control back to
the shell script. The last line of code is a
'System.out.println("Ending...")'. But, 12 hours later, I can still
see the two processes running - the shell script and the child Java
process. I run this shell script from a cron job usually, but it can
hang when run from an interactive shell as well.
The script seems to run fine 90+% of the time.
The particular java code does a lot of ftp stuff using a 3rd party
library. I don't know of any open file handles, etc. No db
connections. I'm thinking of adding a call to System.exit(0), maybe
even a 'finally' block. I have other shell scripts running other Java
programs dealing w/ all sorts of stuff - filesystem, db, mail, but
none seem to hang.
Here's my system:
$ uname -a
HP-UX etc-rp11 B.11.11 U 9000/800
Any ideas??
-------------------------------------------------
## Here's the crontab task
/path/to/myscript.sh >> /path/to/mylog.log 2>&1
-------------------------------------------------
## And here's the shell script
echo "========== $0 starting on `date`... =========="
# Create lockfile
mkdir $lockfile
# Run Java program
java -cp $CLASSPATH MyClass
# Remove lockfile
rmdir $lockfile
echo "========== $0 ending on `date`... =========="
-------------------------------------------------
2. Allow Specific IP only
3. Execution of SQL Script thru shell script
4. Internal Zip Drive, 2 SCSI cards and LILO
5. How to find other copies of same shell script running inside shell?
6. Clean shutdown method under XDM
7. Executing shell commands from inside a Java application
8. "Wild Interrupt" / Soundblaster problem
9. Java, Java, Java, Java, Java, Java .....
10. Interfacing a c prog with a shell prog
11. How Can I control program execution in script shell ?
12. >> Shell Script Execution Question
13. Shell script execution when mail is recieved