⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 update.c

📁 操作系统源代码
💻 C
字号:
/* update - do sync periodically		Author: Andy Tanenbaum */#include <sys/types.h>#include <signal.h>#include <unistd.h>_PROTOTYPE(int main, (void));int main(){  /* Release all (?) open file descriptors. */  close(0);  close(1);  close(2);  /* Release current directory to avoid locking current device. */  chdir("/");  /* Flush the cache every 30 seconds. */  while (1) {	sync();	sleep(30);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -