修改/proc/sys/kernel/core_uses_pid出现WARNING: The file has been changed since reading it!!!

时间:2022-01-29 02:51:22

当以root身份登录,执行vim /proc/sys/kernel/core_uses_pid修改core_uses_pid值的时候,产生如下错误。

WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)?y
"core_uses_pid" E667: Fsync failed
Hit ENTER or type command to continue”


解决方法:

(1)vim /etc/sysctl.conf在最后一行添加kernel.core_uses_pid = 1

修改/proc/sys/kernel/core_uses_pid出现WARNING: The file has been changed since reading it!!!

(2)执行sysctl -p