{"version":"1.0","type":"rich","title":"Gist 4521887","description":"This example shows a shell-command supervisor that forks a child process, monitors its exit status, and restarts it on failure. The code uses POSIX APIs including `fork()`, `execl()`, `waitpid()`, and `signal()` to launch and track the command, while logging each step. It writes a pidfile, tracks restart timing with `timestamp()` and `ms_since_last_restart()`, and bails after exceeding `max_attempts` within a time window, executing an error command if configured. The visualization is a plain C source file, not a graphical chart, demonstrating process lifecycle logic.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4521887?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}