标签: ruby
我正在寻找一种方法来停止当前运行的脚本并在满足延续时重新启动它。
我该怎么做?
答案 0 :(得分:4)
像这样写:
at_exit{ # whatever way you started the program originally such as `program_name`. # Make sure that the new process is detached from the original. }
然后执行:
exit
你想打破的地方。