----- Original Message ----- 
From: "Simon Barner" <[EMAIL PROTECTED]>
To: "Rob" <[EMAIL PROTECTED]>
Cc: "Drew Tomlinson" <[EMAIL PROTECTED]>; "FreeBSD Questions"
<[EMAIL PROTECTED]>
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


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to