repo: ngircd
action: commit
revision: 
path_from: 
revision_from: e3a2a6c44d30a68f3afeab17ba19a5559e09f3a5:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit e3a2a6c44d30a68f3afeab17ba19a5559e09f3a5
Author: Alexander Barton 
Date:   Tue Sep 3 21:33:22 2013 +0200

    getpid.sh: use /bin/pidof when available

diff --git a/src/testsuite/getpid.sh b/src/testsuite/getpid.sh
index 96ab474685111b1322e9c806282f3debfb01ba21..
index ..f200afb9ad69494a45f657f2fa4d4e160a088076 100755
--- a/src/testsuite/getpid.sh
+++ b/src/testsuite/getpid.sh
@@ -1,10 +1,11 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: getpid.sh,v 1.5 2006/08/05 00:15:28 alex Exp $

 # did we get a name?
 [ $# -ne 1 ] && exit 1

+[ -x /bin/pidof ] && exec /bin/pidof -s $@
+
 # detect flags for "ps" and "head"
 UNAME=`uname`
 if [ $UNAME = "FreeBSD" ]; then

-----END OF PAGE-----