There's some things that just don't jibe here. Applets don't run on the server, and if the applet does a Runtime.exec() - which requires a signed applet - the shell script likewise doesn't run on the server. It runs on the client. Clients don't share VMs, so this whole situation doesn't make sense.
A
servlet could encounter this kind of problem, but I wouldn't count on being able to use the "&" option directly, since that's a feature of the command shell, and the item being executed isn't being launched from a command shell (though it could be a script that
did launch that way).
I'm afraid that the only real solution is to stop trying to hack around the problem. Cleaning up the shell scripts so that an abnormal termination is caught and handled cleanly would help (as would fixing the apps the script isinvoking so they won't die to begin with). However, you'd still see a degredation in system response as the number of users increased.
Most of the time a better response is to setup a backend server that runs asynchronous to the web process. The user dumps in a request and the backend server schedules, then processes it, posting a status and/or sending a completion message to let the user know when it's done. If the action will never exceed about 1-3 minutes, you could spin off a
thread and exec() the work, but even there you really need clean scripts.