Change the ruby process name in top

后端 未结 7 847
渐次进展
渐次进展 2021-02-18 14:19

I would like to change the name of the ruby process that gets displayed in the linux/unix top command. I have tried the

$0=\'miname\'

approach

7条回答
  •  Happy的楠姐
    2021-02-18 14:53

    Ruby 2.1 introduced a Process.setproctitle method for this purpose:

    Process.setproctitle("My new title")
    

提交回复
热议问题