commit cab27917dc954294e92c3979570841b85f67619d parent 8693f21b23c5a970a9669a4a4e0b0a130bff4446 Author: Cem Keylan <cem@ckyln.com> Date: Thu, 17 Sep 2020 00:14:49 +0300 respawn: handle errors Diffstat:
M | contrib/respawn | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/respawn b/contrib/respawn @@ -18,6 +18,10 @@ case "$1" in esac while :; do - "$@" + "$@" || err=$? + case $err in + # Usually Ctrl+C interrupt. + 12[7-9]|130) exit 0 + esac [ "$delay" ] && sleep "$delay" done