]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
util/checkplatformsyms.pl: handle command exit code
authorEugene Syromiatnikov <esyr@openssl.org>
Tue, 31 Mar 2026 03:44:30 +0000 (05:44 +0200)
committerTomas Mraz <tomas@openssl.foundation>
Fri, 3 Apr 2026 15:42:45 +0000 (17:42 +0200)
Error out if the executed command (dumpbin/objdump) hasn't been
successful.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:42:17 2026
(Merged from https://github.com/openssl/openssl/pull/30635)

(cherry picked from commit 2753b08a6651cf80c9164aae32c2eeafee67a311)

util/checkplatformsyms.pl

index 3e42f976eaff12fd9ce413ed849c120e4b93c6e8..0ba8d333b2a3cfea0cde8d850859092dee532bf2 100755 (executable)
@@ -58,6 +58,10 @@ if ($Config{osname} eq "MSWin32") {
                 }
             }
         }
+
+        close($OBJFH);
+        ($? >> 8 == 0) or die "Command '$cmd' has failed.";
+
         foreach (@symlist) {
             if (index($exps, $_) < 0) {
                 print "Symbol $_ not in the allowed platform symbols list\n";
@@ -87,5 +91,6 @@ else {
                 }
         }
         close($OBJFH);
-        exit 0;
+
+        exit $? >> 8;
     }