summaryrefslogtreecommitdiff
blob: f57360673ca85891a62efe396b3304b9720b2a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 6d8055b1d44d745f194665458674c6e03f48f322 Mon Sep 17 00:00:00 2001
From: Robin H. Johnson <robbat2@gentoo.org>
Date: Sat, 12 May 2007 22:16:37 -0700
Subject: [PATCH gearman] 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>
---
 server/gearmand |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/server/gearmand b/server/gearmand
index 2d8bd6b..148b1f9 100755
--- a/server/gearmand
+++ b/server/gearmand
@@ -94,6 +94,9 @@ my (
    );
 my $conf_port = 7003;
 
+# Rename binary in process list to make init scripts saner
+$0 = $_ = $0;
+
 Getopt::Long::GetOptions(
                          'd|daemonize'    => \$daemonize,
                          'p|port=i'       => \$conf_port,
-- 
1.5.1.4