Re: Process not moving to background.



andoni.oconchubhair@xxxxxxx writes:

Hi,

I have a script which starts a server application. When I run this
script it works fine and the server starts. All good.

Then I stop the server fine and check it is down. I then run the same
scirpt with an ampersand to run in the background. This doesn't work.
As soon as I try to exit ksh I get an error saying I am still running
a process. Have a look (please ignore my customised prompt!):

What do you mean it does not work. It works. Just because it is in the
background does not mean it is not working. Plus all of its input and
output is still attached to your shell! (stdin, stdout, stderr) so you
cannot just shout down the shell. Ie, stdin, stdout stderr are all still
connected to the stdin, out err of you shell.



C:/export/home/a389584>jobs
[2] + Running nohup sudo /opt/company/app/server/bin/
start-server &
[1] - Running nohup sudo /opt/company/app/server2/bin/
server-central &
C:/export/home/a389584>bg %2
[2] nohup sudo /opt/egain/knowledge/self-service/bin/self-service
&
C:/export/home/a389584>exit
You have running jobs
C:/export/home/a389584>

Thanks for any suggestions you may have.
Andoni.

.