mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
tool/run: fix corner case in exit override
The run tool overrides the 'exit'-procedure to make sure that a loaded run_power_off procedure is always executed. However, a failing run_power_off lead to false-positives: 'make run/...' exited with 0 even tough the run script was not even executed because of a failed power-on/off cycle. In this case, if the run_power_off is the exit code producer, the new exit definition does not finish as intended. As a result, the first exit code is re-written, and errors are not propagated accordingly. The solution is to catch possible errors from power-off within the exit procedure. Fixes genodelabs#5102
This commit is contained in:
parent
e31273a410
commit
8c7e90f7f2
@ -958,7 +958,7 @@ proc have_include { name } {
|
||||
#
|
||||
rename exit real_exit
|
||||
proc exit {{status 0}} {
|
||||
run_power_off
|
||||
catch {run_power_off}
|
||||
|
||||
real_exit $status
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user