You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-perl/Gearman-Server/files/Gearman-Server-1.130.1-Use-...

34 lines
973 B

From acd6722c16e17ddbdf6c73c99c693b7674f0fea7 Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Sat, 12 May 2007 22:16:37 -0700
Subject: Use saner name in process listing.
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>
---
bin/gearmand | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bin/gearmand b/bin/gearmand
index 6046a99..68d1bcf 100755
--- a/bin/gearmand
+++ b/bin/gearmand
@@ -130,6 +130,9 @@ my ($daemonize, $nokeepalive, $notify_pid, $opt_pidfile, $accept, $wakeup,
$wakeup_delay, $conf_host,);
my $conf_port = 4730;
+# Rename binary in process list to make init scripts saner
+$0 = $_ = $0;
+
Getopt::Long::GetOptions(
'd|daemonize' => \$daemonize,
'p|port=i' => \$conf_port,
--
2.14.2