Article 4WQNM Lost background process when a launch script exit

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.latest?d=yIl2AUoC8zA latest?i=vgWrseMCxzE:kp0-ROQmo9M:F7zBnMy latest?i=vgWrseMCxzE:kp0-ROQmo9M:V_sGLiP latest?d=qj6IDK7rITs latest?i=vgWrseMCxzE:kp0-ROQmo9M:gIN9vFwvgWrseMCxzE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments