mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
Pass exit code to s6-init (#59545)
This commit is contained in:
parent
e5129042ad
commit
ed6c70a026
@ -13,8 +13,12 @@ ifelse { s6-test ${1} -eq ${SIGNAL_EXIT_CODE} } {
|
|||||||
# Process terminated by a signal
|
# Process terminated by a signal
|
||||||
define signal ${2}
|
define signal ${2}
|
||||||
foreground { s6-echo "[finish] process received signal ${signal}" }
|
foreground { s6-echo "[finish] process received signal ${signal}" }
|
||||||
|
backtick -n new_exit_code { s6-expr 128 + ${signal} }
|
||||||
|
importas -ui new_exit_code new_exit_code
|
||||||
|
foreground { redirfd -w 1 /var/run/s6/env-stage3/S6_STAGE2_EXITED s6-echo -n -- ${new_exit_code} }
|
||||||
if { s6-test ${signal} -ne ${SIGTERM} }
|
if { s6-test ${signal} -ne ${SIGTERM} }
|
||||||
s6-svscanctl -t /var/run/s6/services
|
s6-svscanctl -t /var/run/s6/services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreground { redirfd -w 1 /var/run/s6/env-stage3/S6_STAGE2_EXITED s6-echo -n -- ${1} }
|
||||||
s6-svscanctl -t /var/run/s6/services
|
s6-svscanctl -t /var/run/s6/services
|
||||||
|
Loading…
x
Reference in New Issue
Block a user