From: "Brian F. Feldman" Date: 2001-09-01T22:39:25+09:00 Subject: [ruby-talk:20668] Re: Changing a program's name at run time via $0... Armin Roehrl wrote: > On Saturday 01 September 2001 03:04, you wrote: > > Anyone have any ideas how to change a program's name while it's > > being executed (specifically on FreeBSD)? > > > > #!/usr/local/bin/ruby -w > > $0 = 'other_name' > > sleep(60) > > > > (quickly dash to another keyboard and type ps (auxwww|-ef)) > > Doesn't seem to work... <:~( Anyone else have any luck trying this or > > thoughts on how to get it to work? -sc > Sorry, I don't know how to do this. > What do you need that for? It's something a lot of long-lived applications running in the background do to report progress, for example. It's a way to report status easily to everyone in a human-readable format that is concentrated in one place (a ps listing). -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------'