while IFS= read -r pid ; do
# /proc/pid/cmdline is null separated.
- if full_command_no_argument=$(cut -d '' -f 1 < /proc/"$pid"/cmdline); then
+ if full_command_no_argument=$(cut -d '' -f 1 2>/dev/null < /proc/"$pid"/cmdline); then
command_basename=$(basename "$full_command_no_argument")
if grep -q "$pattern" <<< "$command_basename"; then
echo "$pid"
if [ -z "$pids" ]; then
if [ "$withtap" -eq "1" ]; then
- pass "No session daemon to kill"
+ fail "No session daemon to kill"
+ else
+ BAIL_OUT "No session daemon to kill"
fi
return 0
fi