Date: Tue, 8 Jul 2003 08:26:45 -0700 From: "Drew Tomlinson" <drew@mykitchentable.net> To: "Simon Barner" <barner@in.tum.de>, "Rob" <listone@deathbeforedecaf.net> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Can I Set Process Name? Message-ID: <003a01c34565$57c94ed0$6e2a6ba5@lc.ca.gov> References: <003001c3455e$b6c322f0$6e2a6ba5@lc.ca.gov> <000a01c34561$228ff5b0$a4b826cb@goo> <20030708151439.GD901@zi025.glhnet.mhn.de>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Simon Barner" <barner@in.tum.de> To: "Rob" <listone@deathbeforedecaf.net> Cc: "Drew Tomlinson" <drew@mykitchentable.net>; "FreeBSD Questions" <freebsd-questions@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003a01c34565$57c94ed0$6e2a6ba5>