From c02d993e736de8dc2e55bb96eaf9fde538f150e0 Mon Sep 17 00:00:00 2001 From: James Laska Date: Tue, 8 Sep 2015 15:43:04 -0400 Subject: [PATCH] Return exit code from spawned process --- tools/scripts/sign.exp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/scripts/sign.exp b/tools/scripts/sign.exp index d85d77d77e..30cbe1d975 100755 --- a/tools/scripts/sign.exp +++ b/tools/scripts/sign.exp @@ -15,3 +15,12 @@ expect { } eof { } } + +lassign [wait] pid spawnid os_error_flag retval + +if {$os_error_flag == 0} { + puts "exit status: $retval" +} else { + puts "errno: $retval" +} +exit $retval