I'm running a c program on a loop and I currently have it booting at startup from .bashrc. I want the program to run forever but the program has crashed on occasions. I know I need a watchdog feature but I'm unsure of how to do it on a RPi 3B+ in C. I found this tutorial...
https://bloggerbrothers.com/2016/12/20/ ... systemctl/
...which introduces the concept of calling systemd throughout your program as a kind of 'heart beat' to prove your program is still alive. However, being in python, I'm not too sure how it would translate to a C program.
Any help greatly appreciated, thanks.