Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于守护进程的选项 :multiple => true ,因此,它允许我启动多个后台进程实例。
现在,当运行命令停止它会停止所有后台进程,我怎样才能单独停止它们?
注意:我知道我们可以通过 pid 杀死,但我希望股票代码也可以 at_exit。
如果at_exit您在终止进程时使用合适的信号,则代码仍应执行。例如,如果您使用SIGINT而不是SIGKILL
at_exit
SIGINT
SIGKILL
Process.kill('SIGINT', pid)