[PATCH perlbal] Use saner name in process listing.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > [PATCH perlbal] Use saner name in process listing.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [PATCH perlbal] Use saner name in process listing.  
Robin H. Johnson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-13-07 12:11 PM

Normally the binary will turn up in the process list as:
/usr/bin/perl $SCRIPTNAME

By adding a single line, we can make it be simply '$SCRIPTNAME'.
This makes writing init.d scripts signficently easier.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
perlbal |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/perlbal b/perlbal
index f0149b3..7a9d28c 100755
--- a/perlbal
+++ b/perlbal
@@ -37,6 +37,10 @@ my $opt_daemonize;
my $opt_config;
my $opt_help;
my $opt_version;
+
+# Rename binary in process list to make init scripts saner
+$0 = $_ = $0;
+
usage(1) unless
Getopt::Long::GetOptions(
'daemon'   => \$opt_daemonize,
--
1.5.1.4







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:28 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register