[openssl] master update

Richard Levitte levitte at openssl.org
Wed Mar 25 09:52:34 UTC 2020


The branch master has been updated
       via  5f1adadce1a7199507b6cb717e2e30261b0d02f5 (commit)
      from  402b00d57921a0c8cd641b190d36bf39ea5fb592 (commit)


- Log -----------------------------------------------------------------
commit 5f1adadce1a7199507b6cb717e2e30261b0d02f5
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Mar 22 04:15:14 2020 +0100

    util/wrap.pl: Correct exit code when signalled
    
    On Unix, a caught signal that exits the process does so with an exit
    code that is 'signal | 128'.  This modifies util/wrap.pl to mimic
    that.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11379)

-----------------------------------------------------------------------

Summary of changes:
 util/wrap.pl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/util/wrap.pl b/util/wrap.pl
index 4c3d4713f1..fd24c42c8b 100755
--- a/util/wrap.pl
+++ b/util/wrap.pl
@@ -35,5 +35,12 @@ my $waitcode = system @cmd;
 # (exitcode << 8 | signalcode)
 die "wrap.pl: Failed to execute '", join(' ', @cmd), "': $!\n"
     if $waitcode == -1;
-exit($? & 255) if ($? & 255) != 0;
+
+# When the subprocess aborted on a signal, 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.
+exit(($? & 255) | 128) if ($? & 255) != 0;
+
+# When not a signal, just shift down the subprocess exit code and use that.
 exit($? >> 8);


More information about the openssl-commits mailing list