[Omaha.pm] $0 = "I am not running";
Jeff Bisbee
jbisbee at gmail.com
Thu Aug 28 04:04:29 PDT 2008
There is no spoon :)
On Wed, Aug 27, 2008 at 2:55 PM, Jay Hannah <jay at jays.net> wrote:
> Fascinating. When you set $0 inside a running Perl program, "ps w" and "ps
> -ef" and some others will report whatever you set. But "ps" won't change...
>
> j
>
>
> $ perl -e '$0 = "I am not running"; sleep 10' &
> $ ps
> PID TTY TIME CMD
> 11323 pts/0 00:00:00 bash
> 11631 pts/0 00:00:00 perl
> 11656 pts/0 00:00:00 ps
> $ ps w
> PID TTY STAT TIME COMMAND
> 11323 pts/0 S 0:00 -bash
> 11631 pts/0 S 0:00 I am not running
> 11657 pts/0 R+ 0:00 ps w
>
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>
--
Jeff Bisbee / jbisbee at gmail.com / jbisbee.multiply.com
More information about the Omaha-pm
mailing list