From owner-freebsd-questions@FreeBSD.ORG Tue Jul 8 08:26:47 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C09737B401 for ; Tue, 8 Jul 2003 08:26:47 -0700 (PDT) Received: from blacklamb.mykitchentable.net (65-37-69-83.bras01.elk.ca.frontiernet.net [65.37.69.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id B496243F75 for ; Tue, 8 Jul 2003 08:26:46 -0700 (PDT) (envelope-from drew@mykitchentable.net) Received: from tagalong (unknown [165.107.42.110]) by blacklamb.mykitchentable.net (Postfix) with SMTP id CE2A53BF41E; Tue, 8 Jul 2003 08:26:45 -0700 (PDT) Message-ID: <003a01c34565$57c94ed0$6e2a6ba5@lc.ca.gov> From: "Drew Tomlinson" To: "Simon Barner" , "Rob" References: <003001c3455e$b6c322f0$6e2a6ba5@lc.ca.gov> <000a01c34561$228ff5b0$a4b826cb@goo> <20030708151439.GD901@zi025.glhnet.mhn.de> Date: Tue, 8 Jul 2003 08:26:45 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: FreeBSD Questions Subject: Re: Can I Set Process Name? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2003 15:26:47 -0000 ----- Original Message ----- From: "Simon Barner" To: "Rob" Cc: "Drew Tomlinson" ; "FreeBSD Questions" Sent: Tuesday, July 08, 2003 8:14 AM > > setproctitle(3) - but I don't know how you would call it from perl. > You can do it by altering the $0 variable: > #!/usr/bin/perl -w > use strict; > $0='Will it work?'; > sleep (10); > A ps | grep 'Will' gives me: > 2551 p3 SN 0:00.02 Will it work? (perl) Thank you both for your answers. I'm not much of a scripter but I tried your suggestion with the webmin script. I found that the actual file is /usr/local/lib/webmin/miniserv.pl and edited the beginning of the file as such: #!/usr/bin/perl # A very simple perl web server used by Webmin $0='webmin' # Require basic libraries package miniserv; However when starting the program it dies with the following message: syntax error at /usr/local/lib/webmin/miniserv.pl line 7, near "package miniserv" BEGIN not safe after errors--compilation aborted at /usr/local/lib/webmin/miniserv.pl line 8. Is there something really easy I'm missing? If it's complicated I'm going to forget it as it's not that important. Thanks, Drew