From: Richard Levitte Date: Wed, 14 Sep 2022 05:07:41 +0000 (+0200) Subject: util/wrap.pl.in: Use parentheses so `kill` gets all its arguments X-Git-Tag: openssl-3.2.0-alpha1~2084 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef6d6e452dc57ef4a55d7a6ec0693be650009bb5;p=thirdparty%2Fopenssl.git util/wrap.pl.in: Use parentheses so `kill` gets all its arguments In perl, this may be ambiguous: fn (expr1), expr2 Is the comma (which may be `=>` just as well in this case) a separator between arguments to `fn`, or is it the comma operator, separating the expressions `fn(expr1)` and `expr2`? It appears that in this particular case, perl takes the existing parentheses to mean the latter. When the former was intended, extra parentheses are required. Fixes #19209 Reviewed-by: Dmitry Belyavskiy Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19211) --- diff --git a/util/wrap.pl.in b/util/wrap.pl.in index de4692f3199..5126513d4c3 100644 --- a/util/wrap.pl.in +++ b/util/wrap.pl.in @@ -69,7 +69,7 @@ die "wrap.pl: Failed to execute '", join(' ', @cmd), "': $!\n" if $waitcode == -1; # When the subprocess aborted on a signal, we simply raise the same signal. -kill ($? & 255) => $$ if ($? & 255) != 0; +kill(($? & 255) => $$) if ($? & 255) != 0; # If that didn't stop this script, mimic what Unix shells do, by # converting the signal code to an exit code by setting the high bit.