aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-09-17 00:14:49 +0300
committerCem Keylan <cem@ckyln.com>2020-09-17 00:14:49 +0300
commitcab27917dc954294e92c3979570841b85f67619d (patch)
tree3a7f8efaa97f46a926e195f29ce90645c3ad2bf0 /contrib
parent8693f21b23c5a970a9669a4a4e0b0a130bff4446 (diff)
downloadinit-cab27917dc954294e92c3979570841b85f67619d.tar.gz
respawn: handle errors
Diffstat (limited to 'contrib')
-rw-r--r--contrib/respawn6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/respawn b/contrib/respawn
index 1b914ea..4126cdb 100644
--- 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