repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove building with NOCRYPTO option
[minix.git]
/
minix
/
commands
/
update
/
update.c
blob
2c1d8783c1f73726b8fff76fa85b117ab6e108b7
1
/* update - do sync periodically Author: Andy Tanenbaum */
2
3
#include <sys/types.h>
4
#include <signal.h>
5
#include <unistd.h>
6
7
int
main
(
void
);
8
9
int
main
()
10
{
11
/* Release all (?) open file descriptors. */
12
close
(
0
);
13
close
(
1
);
14
close
(
2
);
15
16
/* Release current directory to avoid locking current device. */
17
chdir
(
"/"
);
18
19
/* Flush the cache every 30 seconds. */
20
while
(
1
) {
21
sync
();
22
sleep
(
30
);
23
}
24
}