scripts: net: Properly return Zephyr exit code to script

Save the exit code from 'wait' so that it is not lost when PID
is set to zero.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2020-03-13 10:44:19 +02:00 committed by Jukka Rissanen
commit 26685b727b

View file

@ -204,10 +204,15 @@ stop_zephyr ()
wait_zephyr ()
{
local result=""
echo "Waiting for Zephyr $zephyr_pid..."
wait $zephyr_pid
result=$?
zephyr_pid=0
return $result
}