kernel: restore setting KTS_NONE
[minix.git] / commands / update / update.c
blob2c1d8783c1f73726b8fff76fa85b117ab6e108b7
1 /* update - do sync periodically Author: Andy Tanenbaum */
3 #include <sys/types.h>
4 #include <signal.h>
5 #include <unistd.h>
7 int main(void);
9 int main()
11 /* Release all (?) open file descriptors. */
12 close(0);
13 close(1);
14 close(2);
16 /* Release current directory to avoid locking current device. */
17 chdir("/");
19 /* Flush the cache every 30 seconds. */
20 while (1) {
21 sync();
22 sleep(30);