Skip to content

Instantly share code, notes, and snippets.

@narze
Created April 12, 2016 08:39
Show Gist options
  • Save narze/bb429e447e3fe5bfbe533e62c9008bbe to your computer and use it in GitHub Desktop.
Save narze/bb429e447e3fe5bfbe533e62c9008bbe to your computer and use it in GitHub Desktop.
1-liner restart process if killed
until some_command; do echo "Process crashed with exit code $?. Respawning.." >&2; sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment