The following is from /etc/init.d/functions on RHEL. I'm trying to figure out what the __pids_var_run() function does when I came across this while loop.
while : ; do
read line
[ -z "$line" ] && break
for p in $line ; do
if [ -z "${p//[0-9]/}" -a -d "/proc/$p" ] ; then
if [ -n "$binary" ] ; then
local b=$(readlink /proc/$p/exe | sed -e 's/\s*(deleted)$//')
[ "$b" != "$binary" ] && continue
fi
pid="$pid $p"
fi
done
done < "$pid_file"
Could someone explain what while : ; do ; ... done < "$pid_file" does? More specifically, the last part after done, as the rest of it more or less makes sense.