From 2bdbdec5d9254b2ddc28c0d7ff673ce7d836ea95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Fust=C3=A9?= Date: Fri, 1 Mar 2024 17:32:34 +0100 Subject: [PATCH] Do not wait on pid you are not a parent. The zombi fix did too much modifications breaking the global time-out function. As the wait $pid failed, we no longer create the watchdog file. Fix by reverting unnecessary changes. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 03a616a..398eb7b 100755 --- a/testssl.sh +++ b/testssl.sh @@ -17112,7 +17112,7 @@ run_renego() { for ((i=0; i < ssl_reneg_attempts; i++ )); do echo R; sleep $ssl_reneg_wait; done) | \ $OPENSSL s_client $(s_client_options "$proto $legacycmd $STARTTLS $BUGS -connect $NODEIP:$PORT $PROXY $SNI") >$TMPFILE 2>>$ERRFILE & pid=$! - ( sleep $(($ssl_reneg_attempts*3)) && pkill -HUP -P $pid && wait $pid && touch $TEMPDIR/was_killed ) >&2 2>/dev/null & + ( sleep $(($ssl_reneg_attempts*3)) && kill $pid && touch $TEMPDIR/was_killed ) >&2 2>/dev/null & watcher=$! # Trick to get the return value of the openssl command, output redirection and a timeout. Yes, some target hang/block after some tries. wait $pid && pkill -HUP -P $watcher