14

how to programing daemon to create log record every second

view full story
linux-howto

http://www.unix.com – i write ..... Code: #include <stdio.h> #include <fcntl.h> #include <signal.h> #include <unistd.h> #define RUNNING_DIR    "/tmp" #define LOCK_FILE      "exampled.lock" #define LOG_FILE        "exampled.log" void log_message(filename,message) char *filename; char *message; { FILE *logfile;         logfile=fopen(filename,"a");         if(!logfile) return;         fprintf(logfile,"%s\n",message);     (HowTos)