Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
众所周知,在 bash 中,如果我们启动一个进程,例如“bash another.sh”,main bash 会等待 another.sh 完成,然后执行 main bash 中剩余的代码,有什么方法可以退出在 another.sh 返回之前的主外壳?
如果您希望能够在进程完成之前退出 shell,您可以在xls 的语句前面加上nohup:
nohup bash another.sh &
SIGHUP那么您新启动的进程在注销时将不会收到,并将继续在后台运行。
SIGHUP