process in background

Hi Guys,

  I am facing some weird problem with my shell script. The script shows up a menu and for every ontion internally calls a shell script which start/stop various servers. When I am using '&' while calling the internal shell script  so that the server run in the background. For exiting the script user need to use 'q'. \( if  'q' then 'exit' \)

 Now the problem is when I run the script, it start the server  properly but if I do a Control\+c or close the window the server in the background also stops. But if I use q to quit then nothing happens to the server and it continues to run perfectly. 

Can anyone tell me the reason for that.

Thanks,
Ankur

A decent server should daemonize itself. You should ask the author of the server to fix it. Those internal scripts which are called by the menu script could use the trap command to ignore interrupts. Or the menu script could use the nohup command to invoke the internal scripts.