Lost background process when a launch script exit
by yhus from LinuxQuestions.org on (#4WQNM)
Hi,
I launched a background process in a script boot.sh
$ cat boot.s
#!/bin/sh
start_a_background_loop_task.sh &
.....
The start_a_background_loop_task.sh is a loop script, it should be running until the machine is turned off. But when the boot.sh exited, the start_a_background_loop_task.sh exited as well. I tried to put nohup, could not keep the start_a_background_loop_task.sh running either. How can I fix it?
Thank you.


I launched a background process in a script boot.sh
$ cat boot.s
#!/bin/sh
start_a_background_loop_task.sh &
.....
The start_a_background_loop_task.sh is a loop script, it should be running until the machine is turned off. But when the boot.sh exited, the start_a_background_loop_task.sh exited as well. I tried to put nohup, could not keep the start_a_background_loop_task.sh running either. How can I fix it?
Thank you.