screen 是一个非常有用的软件,可以让程序在后台稳定的执行,而且管理上也非常方便,所以有很多东西我都是用 screen 管理的。现在我想要写个管理后台,需要在程序中将 screen 中执行的服务重启,不知道怎么用 Python 或 Java 实现。改用 nohup 应该是可以的,但是感觉 nohup 管理不方便。或者还有什么能让各种语言的程序当后台服务一样运行的方法。
2 回答

呼唤远方
TA贡献1856条经验 获得超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
提交
取消