feat: add heartbeat feature to auto-terminate program on failure
Detect heartbeat status every 5 seconds. If no heartbeat is received within 5 seconds, the program will exit automatically.
Implements: #424
consider add an args param to enable or disable this feature
Quality Gate passed
Issues
6 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
6 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Considering that this C++ program is intended to be used as a library and invoked by programs written in other languages, and given that in a standalone deployment (without container management tools like Docker), the C++ program must terminate synchronously if the calling program crashes or exits unexpectedly — to avoid running as an orphaned process — a heartbeat mechanism is therefore required.