2013-03-22 109 views
0

我有2个程序是无终端的,我想在启动我的Ubuntu服务器时在后台运行它们。现在,我已经在我的rc.local:启动时运行的Ubuntu程序

setsid mono ../root/Check.exe 

setsid sh ../root/blabla.sh 

他们两人都是无尽所以Check.exe永远不会退出,为此blabla.sh从来没有运行。我该怎么办?

回答

2

使用nohup它会停止接收NOHUP信号的进程,因此如果您退出调用该程序的shell,则会终止进程。 &在后台运行进程。

nohup setsid mono ../root/Check.exe & 

nohup setsid sh ../root/blabla.sh &