I suspect this is not doable just because of the security implications, but here's what I'd like to do.
Basically we run a bash shell-script on our CentOS server that calls
Program-A (in our case JMeter, but that is arbitrary) which runs and dumps data into a log file. After that process finishes the shell-script starts up
Program-B to analyze the log.
What I would like to do is stop the instance of
Program-A1 and replace it with another instance of
Program-A2, or some how swap them in place so I can safely end
Program-A1 without starting up
Why would I want to do this? The main reason is that
Program-A loads some configuration files at its startup and if we make changes to those config files we have to restart the program for them to take effect, which I'd like to avoid.
I understand this is most likely not possible, but if it is I would greatly appreciate the information.
EDIT: I suppose I wasn't clear enough. Basically my shellscript looks like this:
Program-A finishes dumping to our log,
Program-B picks up the log and parses it. The problem I'm having is sometimes
Program-A's settings are not set correctly or something is wrong with the environment when it starts which means that we'll need to run the whole thing again. We'd like to avoid that by just replacing our first instance of
Program-A (calling it
Program-A1) with a new instance of
Program-A (we'll call this
Program-A2). Does this make more sense to everyone?
The main reason we would like to do this is because
Program-B are actually a single part of a GIANT shell script that takes hours to run. Rather than restart the whole process for one individual part, we'd like to restart the single troubled program.