Skip to content

Commit

Permalink
Disguising stderr from jls generally considered harmful
Browse files Browse the repository at this point in the history
Undisguising it dumps out the following logspew:

jls: unknown parameter: allow

PR: 191019
  • Loading branch information
ngie-eign committed Feb 21, 2015
1 parent 03bb9e5 commit 1b92798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/pkill/tests/pgrep-j_test.sh
Expand Up @@ -4,7 +4,7 @@
jail_name_to_jid()
{
local check_name="$1"
jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
}

base=pgrep_j_test
Expand Down Expand Up @@ -38,6 +38,7 @@ for i in `seq 1 10`; do
esac
sleep 0.1
done
sleep 0.5

pid1="$(pgrep -f -x -j "$jid" "$sleep $sleep_amount" | sort)"
pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \
Expand Down
3 changes: 2 additions & 1 deletion bin/pkill/tests/pkill-j_test.sh
Expand Up @@ -4,7 +4,7 @@
jail_name_to_jid()
{
local check_name="$1"
jls -j "$check_name" -s 2>/dev/null | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
jls -j "$check_name" -s | tr ' ' '\n' | grep jid= | sed -e 's/.*=//g'
}

base=pkill_j_test
Expand Down Expand Up @@ -40,6 +40,7 @@ for i in `seq 1 10`; do
esac
sleep 0.1
done
sleep 0.5

if pkill -f -j "$jid" $sleep && sleep 0.5 &&
! -f ${PWD}/${base}_1_1.pid &&
Expand Down

0 comments on commit 1b92798

Please sign in to comment.