path: xdm_1:1.1.17-2/debian/xdm.prerm.in # make sure we got numbers back [ $PROCESS -eq $PROCESS ] 2> /dev/null || die "pidof returned non-numeric value" # we could use grep -q here if ps would ignore SIGPIPE :-P if (ps axj | grep "^ *$PROCESS" > /dev/null 2>&1); then path: xdm_1:1.1.17-2/debian/xdm.prerm.in --name $(basename $DAEMON); then # any children? PARENTS=$(pidof $DAEMON || true) CHILDREN= if [ -n "$PARENTS" ]; then