linux - 看门狗设备文件写入 'V'的意义

标签 linux embedded-linux watchdog

当我们执行 echo V >/dev/watchdog 时,这意味着什么?一篇文章说它可以防止意外停止看门狗。我不清楚这个目的。

最佳答案

根据内核文档,这称为“魔术关闭”功能 https://www.kernel.org/doc/Documentation/watchdog/watchdog-api.txt

Magic Close feature:

If a driver supports "Magic Close", the driver will not disable the
watchdog unless a specific magic character 'V' has been sent to
/dev/watchdog just before closing the file.  If the userspace daemon
closes the file without sending this special character, the driver
will assume that the daemon (and userspace in general) died, and will
stop pinging the watchdog without disabling it first.  This will then
cause a reboot if the watchdog is not re-opened in sufficient time.

关于linux - 看门狗设备文件写入 'V'的意义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38667898/

相关文章:

c - 内核文件中函数错误的多重定义

linux - Sybase 16 startserver 由于缺少 libsapcrypto.so 而失败

linux - 无法处理虚拟地址处的内核分页请求 - 内核 OOPS

c++ - 如何在 Windows 7 上使用看门狗

crash-dumps - 当我的应用程序锁定在客户的机器上时的崩溃报告看门狗

regex - 在日期 Bash shell 脚本之前提取文件名

embedded-linux - Yocto/Bitbake 将空目录添加到 rootfs 嵌入式 Linux 的秘诀

linux - 在 i.MX6 中使用 sysfs 设置 GPIO 失败

iPhone,如何避免看门狗因启动时间过长而杀死我的应用程序?

c - 绑定(bind)到 ANY 接口(interface)的缺点