diff options
author | ngie <ngie@FreeBSD.org> | 2015-02-21 23:39:43 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-02-21 23:39:43 +0000 |
commit | 1b927988cf08d72f4aad46a9f54c31b8f3ca33cf (patch) | |
tree | a2df170b664d3124702e6ece7f111b4a1f45d4cb /bin/pkill | |
parent | 03bb9e58897ceb7ff3fdac83582df1de1cf249c0 (diff) | |
download | FreeBSD-src-1b927988cf08d72f4aad46a9f54c31b8f3ca33cf.zip FreeBSD-src-1b927988cf08d72f4aad46a9f54c31b8f3ca33cf.tar.gz |
Disguising stderr from jls generally considered harmful
Undisguising it dumps out the following logspew:
jls: unknown parameter: allow
PR: 191019
Diffstat (limited to 'bin/pkill')
-rw-r--r-- | bin/pkill/tests/pgrep-j_test.sh | 3 | ||||
-rw-r--r-- | bin/pkill/tests/pkill-j_test.sh | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/pkill/tests/pgrep-j_test.sh b/bin/pkill/tests/pgrep-j_test.sh index 4830ace..e24e5c2 100644 --- a/bin/pkill/tests/pgrep-j_test.sh +++ b/bin/pkill/tests/pgrep-j_test.sh @@ -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 @@ -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)" \ diff --git a/bin/pkill/tests/pkill-j_test.sh b/bin/pkill/tests/pkill-j_test.sh index 5635df3..26e185f 100644 --- a/bin/pkill/tests/pkill-j_test.sh +++ b/bin/pkill/tests/pkill-j_test.sh @@ -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 @@ -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 && |