gnu@perl has asked for the wisdom of the Perl Monks concerning the following question:
I have the need to display different information under the 'ps -ef' output. I have tried simply setting $0='my_new_name'; but this has no effect. I looked here 83181 but it did not offer any further information
I have tried making a small program which sets $0 and then forks to see if the child would pick up the new $0, but no such luck, still just displays (/usr/bin/perl -w ./test.pl
).
This makes sense because the process table is populated with the process information before the program is evaluated, but does anyone know of a way to do this under Solaris 8?
Any Ideas?
TIA,
Chad
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Changing $0 under solaris
by Nitrox (Chaplain) on May 20, 2004 at 17:44 UTC | |
by gnu@perl (Pilgrim) on May 20, 2004 at 18:16 UTC | |
|
Re: Changing $0 under solaris
by JSchmitz (Canon) on May 20, 2004 at 18:18 UTC | |
|
Re: Changing $0 under solaris
by Plankton (Vicar) on May 20, 2004 at 20:58 UTC |