[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] $0 = "I am not running";



There is no spoon :)

On Wed, Aug 27, 2008 at 2:55 PM, Jay Hannah <jay@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@pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>



-- 
Jeff Bisbee / jbisbee@gmail.com / jbisbee.multiply.com