我有一个由 init.d 脚本在后台执行的进程。例如:
case "$1" in
start)
/bin/myprocess &
stop)
killall myprocess
restart)
killall myprocess
/bin/myprocess &
esac
Run Code Online (Sandbox Code Playgroud)
在某些情况下,myprocess 可能会失败并返回。是否有任何(标准)方法来检测其故障并自动重新启动?