[lwatch-cvs] files/src control.c,1.11,1.12 lwatch.c,1.17,1.18
Brought to you by:
arturcz
|
From: <ar...@us...> - 2003-04-04 18:35:18
|
Update of /cvsroot/lwatch/files/src
In directory sc8-pr-cvs1:/tmp/cvs-serv30119
Modified Files:
control.c lwatch.c
Log Message:
- syslog support (for debugging puprpose, will be removed)
Index: control.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/control.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** control.c 8 Aug 2002 14:35:24 -0000 1.11
--- control.c 4 Apr 2003 18:35:10 -0000 1.12
***************
*** 34,37 ****
--- 34,38 ----
#include <stdio.h>
#include <stdlib.h>
+ #include <syslog.h>
#include <sys/poll.h>
***************
*** 63,66 ****
--- 64,68 ----
break;
}
+ syslog(LOG_NOTICE,"Received signal %i%s\n",i,loop?"":" - exiting");
#ifdef DEBUG
printf("Received signal %i%s\n",i,loop?"":" - exiting");
Index: lwatch.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/lwatch.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** lwatch.c 4 Apr 2003 18:29:14 -0000 1.17
--- lwatch.c 4 Apr 2003 18:35:11 -0000 1.18
***************
*** 34,38 ****
#include <stdlib.h>
#include <string.h>
! #include <syslog.h>
#include <unistd.h>
--- 34,38 ----
#include <stdlib.h>
#include <string.h>
! #include <syslog.h>
#include <unistd.h>
***************
*** 57,62 ****
checkeof=0;
! openlog("lwatch",LOG_NDELAY|LOG_PID,LOG_SYSLOG);
! syslog(LOG_INFO,"started");
parse_options(argc,argv);
parse_config();
--- 57,62 ----
checkeof=0;
! openlog("lwatch",LOG_NDELAY|LOG_PID,LOG_SYSLOG);
! syslog(LOG_INFO,"started");
parse_options(argc,argv);
parse_config();
***************
*** 137,141 ****
free_parser();
free_settings();
! closelog();
exit(0);
}
--- 137,141 ----
free_parser();
free_settings();
! closelog();
exit(0);
}
|