fix clrbitmap to really clear the entire bitmap
[unix-history] / usr / src / usr.sbin / update / update.c
CommitLineData
9f40bd24 1static char *sccsid = "@(#)update.c 4.2 (Berkeley) %G%";
a675940b
BJ
2/*
3 * Update the file system every 30 seconds.
4 * For cache benefit, open certain system directories.
5 */
6
7#include <signal.h>
8
9char *fillst[] = {
10 "/bin",
9f40bd24 11 "/lib",
a675940b
BJ
12 "/usr",
13 "/usr/bin",
9f40bd24
BJ
14 "/usr/lib",
15 "/usr/ucb",
a675940b
BJ
16 0,
17};
18
19main()
20{
21 char **f;
22
23 if(fork())
24 exit(0);
25 close(0);
26 close(1);
27 close(2);
28 for(f = fillst; *f; f++)
29 open(*f, 0);
30 dosync();
31 for(;;)
32 pause();
33}
34
35dosync()
36{
37 sync();
38 signal(SIGALRM, dosync);
39 alarm(30);
40}