mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Fix order of the redirect
https://github.com/koalaman/shellcheck/wiki/SC2069
This commit is contained in:
parent
305fcca2ae
commit
b7b88a03e7
@ -270,7 +270,7 @@ wait_kill(){
|
|||||||
pid=$1
|
pid=$1
|
||||||
maxsleep=$2
|
maxsleep=$2
|
||||||
while true; do
|
while true; do
|
||||||
if ! ps $pid 2>&1 >/dev/null; then
|
if ! ps $pid >/dev/null 2>&1; then
|
||||||
return 0 # didn't reach maxsleep yet
|
return 0 # didn't reach maxsleep yet
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -702,7 +702,7 @@ sockread() {
|
|||||||
pid=$!
|
pid=$!
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if ! ps $pid 2>&1 >/dev/null; then
|
if ! ps $pid >/dev/null 2>&1; then
|
||||||
break # didn't reach maxsleep yet
|
break # didn't reach maxsleep yet
|
||||||
kill $pid >&2 2>/dev/null
|
kill $pid >&2 2>/dev/null
|
||||||
fi
|
fi
|
||||||
@ -712,7 +712,7 @@ sockread() {
|
|||||||
done
|
done
|
||||||
#FIXME: cleanup, we have extra function for this now
|
#FIXME: cleanup, we have extra function for this now
|
||||||
|
|
||||||
if ps $pid 2>&1 >/dev/null; then
|
if ps $pid >/dev/null 2&>1; then
|
||||||
# time's up and dd is still alive --> timeout
|
# time's up and dd is still alive --> timeout
|
||||||
kill $pid
|
kill $pid
|
||||||
wait $pid 2>/dev/null
|
wait $pid 2>/dev/null
|
||||||
@ -1460,7 +1460,7 @@ sockread_serverhello() {
|
|||||||
[[ $maxsleep -le 0 ]] && break
|
[[ $maxsleep -le 0 ]] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
if ps $pid 2>&1 >/dev/null; then
|
if ps $pid >/dev/null 2>&1; then
|
||||||
# time's up and dd is still alive --> timeout
|
# time's up and dd is still alive --> timeout
|
||||||
kill $pid >&2 2>/dev/null
|
kill $pid >&2 2>/dev/null
|
||||||
wait $pid 2>/dev/null
|
wait $pid 2>/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user