From: Marcin Krol Date: Fri, 4 Sep 2015 23:38:17 +0000 (+0000) Subject: - fix bug in pidofproc() X-Git-Tag: 0.5.0~1 X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=commitdiff_plain;h=353d0880d93063ab3a069a7b2ea91e362082550e - fix bug in pidofproc() --- diff --git a/lib/functions b/lib/functions index 4187139..ced6e97 100644 --- a/lib/functions +++ b/lib/functions @@ -979,6 +979,8 @@ pidofproc() { for p in $(< "${pidfile}"); do [ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p" done + else + unset pidfile fi # Next try "pidof" if pidfile is not specified