Weird process behaviour with linux and Runtime.exec()

Hello gents,

I've got a question concerning the use of Runtime.exec() to launch a process on a linux system from a java web application.

The process is a stand alone java application that I launch using a shell script

In the shell script I have the following command line :

java -Xms256M -Xmx256M -cp $CLASSPATH $className start &

When the script is launched manually, I end up with one process and 11 children threads.

When the script is called by the main application, I end up with one process, one child process and 11 grandchildren ...

Anyway, the stand alone app works fine but I'm wondering about if there is anything wrong and curious about an explanation.

Any help or tip will be welcome.

Thanks.

[774 byte] By [John_Archera] at [2007-11-26 15:30:16]
# 1

Linux is wierd about counting processes for one thing. Although that doesn't overly seem to be your problem. What is the extra process? Can you see? Something OSy I'd imagine.

Anyway if it works then I would say there is nothing wrong. And there doesn't appear to be anything majorly untoward so I wouldn't overly worry about it.

cotton.ma at 2007-7-8 21:46:51 > top of Java-index,Java Essentials,Java Programming...