]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
pidofproc: do not fallback, if pidfile was specified
authorElan Ruusamäe <glen@delfi.ee>
Mon, 18 May 2015 14:01:13 +0000 (17:01 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 18 May 2015 14:01:13 +0000 (17:01 +0300)
lib/functions

index f337e82f1fef21d6a52d41042321ec9f175e9725..3e111d99b3fd6a83f81e4f9a49b65387636885d3 100644 (file)
@@ -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
 
This page took 0.243731 seconds and 4 git commands to generate.