scripts: net: Properly return Zephyr exit code to script
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 <c0e05887987e3015fb9a12ef640a972ca16d7be2@intel.com>

zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr