diff options
author | Richard Levitte <levitte@openssl.org> | 2022-08-22 18:40:54 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-08-24 01:35:39 +0200 |
commit | bf16ee4f95c31a66e76056c691f25a0d2b4a39c4 (patch) | |
tree | 6b82c328c96294448d3988f083174dc0fa13f55c /util | |
parent | Fix the return type for the rlayer_skip_early_data callback (diff) | |
download | openssl-bf16ee4f95c31a66e76056c691f25a0d2b4a39c4.tar.xz openssl-bf16ee4f95c31a66e76056c691f25a0d2b4a39c4.zip |
util/wrap.pl.in: If the subprocess died with a signal, let's re-signal it
A simple 'kill' of the same signal on our own process should do it.
This will allow the shell that this is running under to catch it
properly, and output something if it usually does that.
Fixes #19041
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19042)
Diffstat (limited to 'util')
-rw-r--r-- | util/wrap.pl.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/wrap.pl.in b/util/wrap.pl.in index b13c34d851..de4692f319 100644 --- a/util/wrap.pl.in +++ b/util/wrap.pl.in @@ -68,7 +68,10 @@ my $waitcode = system @cmd; die "wrap.pl: Failed to execute '", join(' ', @cmd), "': $!\n" if $waitcode == -1; -# When the subprocess aborted on a signal, mimic what Unix shells do, by +# When the subprocess aborted on a signal, we simply raise the same signal. +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. # This only happens on Unix flavored operating systems, the others don't # have this sort of signaling to date, and simply leave the low byte zero. |