// A dummy daemon, usefull for exercitations with // init(8) services. // // Andrea Leofreddi, #include #include #include int main() { FILE *out = fopen("/tmp/dummyd.log", "a"); time_t now; if(fork()) return 0; for(;;) { time(&now); fprintf(out, "Mark at %s", ctime(&now)); fflush(out); sleep(3); } }