(1)&是在后台執行,當執行./startWebLogic.sh & 的時候,即使ctrl+c,startWebLogic.sh仍然執行;但當關掉shell后,startWebLogic.sh進程同樣消失。
(2)nohup是不掛斷運行,當執行nohup ./startWebLogic.sh,關閉shell后,startWebLogic.sh進程仍然存在;但用ctrl+c,則進程消失。
(3)要讓進程不受shell關閉和ctrl+c的影響,則用nohup與&的組合方式:nohup /startWebLogic.sh &