From owner-freebsd-questions@FreeBSD.ORG Tue Jul 8 08:43:14 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 7A0DB37B401 for ; Tue, 8 Jul 2003 08:43:14 -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 8F41943F93 for ; Tue, 8 Jul 2003 08:43:13 -0700 (PDT) (envelope-from drew@mykitchentable.net) Received: from tagalong (unknown [165.107.42.110]) by blacklamb.mykitchentable.net (Postfix) with SMTP id A89AA3BF42D; Tue, 8 Jul 2003 08:43:12 -0700 (PDT) Message-ID: <008501c34567$a3f2eb20$6e2a6ba5@lc.ca.gov> From: "Drew Tomlinson" To: , "FreeBSD Questions" References: <003001c3455e$b6c322f0$6e2a6ba5@lc.ca.gov><000a01c34561$228ff5b0$a4b826cb@goo><20030708151439.GD901@zi025.glhnet.mhn.de><003a01c34565$57c94ed0$6e2a6ba5@lc.ca.gov> <20030708152937.GA91154@catflap.home.slightlystrange.org> Date: Tue, 8 Jul 2003 08:43:12 -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 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:43:14 -0000 ----- Original Message ----- From: "Daniel Bye" To: "FreeBSD Questions" Sent: Tuesday, July 08, 2003 8:29 AM On Tue, Jul 08, 2003 at 08:26:45AM -0700, Drew Tomlinson wrote: > > > > $0='webmin'; ^ > > > > However when starting the program it dies with the following message: > > > > Is there something really easy I'm missing? If it's complicated I'm > > going to forget it as it's not that important. > Yes - a `;' at the end of the line ;-) Thanks. That removed the error but failed to change the process name. I looked at the code a little more. I'm not experienced in this but it seems to me that the 'package miniserv;' line calls a precompiled program? Here's the beginning of the script: #!/usr/bin/perl # A very simple perl web server used by Webmin $0='webmin'; # Require basic libraries package miniserv; use Socket; use POSIX; Then a little farther in the script, I see this code: # Get miniserv's perl path and location $miniserv_path = $0; open(SOURCE, $miniserv_path); =~ /^#!(\S+)/; $perl_path = $1; close(SOURCE); @miniserv_argv = @ARGV; So I suspect the process name gets set in this somewhere? Thanks, Drew