From 4cdc89aa61f932d186ea5c52f3138d3bd2711314 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 13 Mar 2015 14:56:30 -0500 Subject: [PATCH] Revert to 2>&1 > /dev/null order because it isn't behaving correctly. --- testssl.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testssl.sh b/testssl.sh index b62b164..1972aaa 100755 --- a/testssl.sh +++ b/testssl.sh @@ -270,7 +270,7 @@ wait_kill(){ pid=$1 maxsleep=$2 while true; do - if ! ps $pid >/dev/null 2>&1; then + if ! ps $pid 2>&1 >/dev/null ; then return 0 # didn't reach maxsleep yet fi sleep 1 @@ -702,7 +702,7 @@ sockread() { pid=$! while true; do - if ! ps $pid >/dev/null 2>&1; then + if ! ps $pid 2>&1 >/dev/null ; then break # didn't reach maxsleep yet kill $pid >&2 2>/dev/null fi @@ -712,7 +712,7 @@ sockread() { done #FIXME: cleanup, we have extra function for this now - if ps $pid >/dev/null 2&>1; then + if ps $pid 2&>1 >/dev/null ; then # time's up and dd is still alive --> timeout kill $pid wait $pid 2>/dev/null @@ -1460,7 +1460,7 @@ sockread_serverhello() { [[ $maxsleep -le 0 ]] && break done - if ps $pid >/dev/null 2>&1; then + if ps $pid 2>&1 >/dev/null ; then # time's up and dd is still alive --> timeout kill $pid >&2 2>/dev/null wait $pid 2>/dev/null