init/main.c中相关代码:
if (!(pid=fork())) {
close(0);
if (open("/etc/rc",O_RDONLY,0))
_exit(1);
execve("/bin/sh",argv_rc,envp_rc);
_exit(2);
}
/etc/rc文件内容:
/etc/update &
echo "/dev/hd1 /" > /etc/mtab
echo " Ok. "
/etc/update的作用是每隔30秒调用sync()一次,既刷新一次。