commit 2ec0a78e657d8df42c4f3f23ee9a8d26a5acf1aa
Author: Elan Ruusamäe <[email protected]>
Date:   Mon May 18 17:01:13 2015 +0300

    pidofproc: do not fallback, if pidfile was specified

 lib/functions | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/lib/functions b/lib/functions
index f337e82..3e111d9 100644
--- a/lib/functions
+++ b/lib/functions
@@ -990,8 +990,8 @@ pidofproc() {
                done
        fi
 
-       if [ -z "$pid" ]; then
-               # Next try "pidof"
+       # Next try "pidof" if pidfile is not specified
+       if [ -z "$pid" ] && [ -z "$pidfile" ]; then
                pid=$(pidof -o $$ -o $PPID -o %PPID -x "$1")
        fi
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/rc-scripts.git/commitdiff/2ec0a78e657d8df42c4f3f23ee9a8d26a5acf1aa

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to