From owner-freebsd-bugs Fri Jun 13 04:00:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA24022 for bugs-outgoing; Fri, 13 Jun 1997 04:00:11 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA23975; Fri, 13 Jun 1997 04:00:06 -0700 (PDT) Resent-Date: Fri, 13 Jun 1997 04:00:06 -0700 (PDT) Resent-Message-Id: <199706131100.EAA23975@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, andrew@ugh.net.au Received: from css.tuu.utas.edu.au (root@css.tuu.utas.edu.au [131.217.115.65]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA23741 for ; Fri, 13 Jun 1997 03:52:32 -0700 (PDT) Received: from sally.ugh.net.au (dialin52.hbt.utas.tassie.net.au [203.57.208.52]) by css.tuu.utas.edu.au (8.8.5/8.8.5) with ESMTP id UAA03573 for ; Fri, 13 Jun 1997 20:52:41 +1000 (EST) Received: (from andrew@localhost) by sally.ugh.net.au (8.8.5/8.8.5) id BAA00860; Tue, 10 Jun 1997 01:21:57 +1000 (EST) Message-Id: <199706091521.BAA00860@sally.ugh.net.au> Date: Tue, 10 Jun 1997 01:21:57 +1000 (EST) From: Andrew Reply-To: andrew@ugh.net.au To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/3859: perl and the $0 variable Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3859 >Category: bin >Synopsis: Setting the $0 variable in perl dosnt do as is expected. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 13 04:00:03 PDT 1997 >Last-Modified: >Originator: Andrew >Organization: UgH! >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: andrew@sally~/syncpass>perl -v This is perl, version 4.0 $RCSfile: perl.c,v $$Revision: 1.7 $$Date: 1996/06/30 09:47:56 $ Patch level: 36 Copyright (c) 1989, 1990, 1991, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 4.0 source kit. >Description: In perl you are meant to be able to set the "name" of the current running process as seen by ps by setting the $0 variable. Unfortunatley it the name of the process seems to be set to the value of $0 and an awful lot of spaces (they are spaces and not tabs or something - ps > file --FTP--> mac > text editor). >From memory this worked in earlier versions of FreeBSD (and whatever versions of perl they came with) such as 2.1.5. This problem effects perl 5.003 as from the ports collection as well. >How-To-Repeat: Run: perl -e '$0 = "hmm"; sleep 1000;' the suspend it and type ps -uww (the ww is so the entire command is printed, not just the first few characters). >Fix: >Audit-Trail: >Unformatted: