diff options
author | Cem Keylan <cem@ckyln.com> | 2020-09-17 00:14:49 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-09-17 00:14:49 +0300 |
commit | cab27917dc954294e92c3979570841b85f67619d (patch) | |
tree | 3a7f8efaa97f46a926e195f29ce90645c3ad2bf0 | |
parent | 8693f21b23c5a970a9669a4a4e0b0a130bff4446 (diff) | |
download | init-cab27917dc954294e92c3979570841b85f67619d.tar.gz |
respawn: handle errors
-rw-r--r-- | contrib/respawn | 6 |
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 |