Search
Generic filters
Exact matches only
  • Detect process running, if not, restart it

    25th December 2014

    Raspberry-Pi

    Raspberrypi - Codehaven

    In a bash environment:
    If your program was not found in the process list it will be started again. It tests every 2 minutes in this example and the loop runs forever (press ctrl-c to break).

    Good to run at start up for a robot program, just turn on and it goes!, any errors and it still should run again after 2 minutes.

    Was this code snippet helpful?

    Comment on this Code Snippet?