screen 是一個非常有用的軟件,可以讓程序在后臺穩(wěn)定的執(zhí)行,而且管理上也非常方便,所以有很多東西我都是用 screen 管理的。現(xiàn)在我想要寫個管理后臺,需要在程序中將 screen 中執(zhí)行的服務(wù)重啟,不知道怎么用 Python 或 Java 實現(xiàn)。改用 nohup 應(yīng)該是可以的,但是感覺 nohup 管理不方便。或者還有什么能讓各種語言的程序當(dāng)后臺服務(wù)一樣運行的方法。
2 回答

呼喚遠方
TA貢獻1856條經(jīng)驗 獲得超11個贊
When a program terminates, screen (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previously displayed window; if none are left, screen exits.
所以說,你直接kill
掉screen
里面運行的程序,然后新開一個窗口,不就可以了嗎?
添加回答
舉報
0/150
提交
取消