From: Brian Candler Date: 2009-12-12T21:59:25+09:00 Subject: Re: Is it possible to force a Ruby program to run as a proc name different than "ruby"? Brian Candler wrote: > I単aki Baz Castillo wrote: >> So, is there some way to force the process to appear as "rb_program" in >> /proc/PID/status? > > Have you tried > > $0 = 'rb_program' > > ? ... or I can't remember the details, but perhaps you needed $0.replace('rb_program'), but that doesn't work for newer versions of Ruby where $0 is a frozen string, hence the required special code: > $progname = $0 > alias $PROGRAM_NAME $0 > alias $0 $progname > trace_var(:$0) {|val| $PROGRAM_NAME = val} # update for ps -- Posted via http://www.ruby-forum.com/.