I have two binary files that I need to run (e.g., hello1 and hello2 and the order has to be hello1 followed by hello2), but from time to time hello2 crashes and when it crashes I need to manually restart hello2. I want a Bash script to keep checking the status of hello1 and hello2 and if either of them crashes then I want to start hello1 and hello2.
On Linux is checking the PIDs of hello1 and hello2 the best way to do this?