[lwatch-cvs] files/src defaults.h,1.5,1.6 lwatch.c,1.11,1.12
Brought to you by:
arturcz
|
From: <ar...@us...> - 2003-03-27 16:08:29
|
Update of /cvsroot/lwatch/files/src
In directory sc8-pr-cvs1:/tmp/cvs-serv27386/src
Modified Files:
defaults.h lwatch.c
Log Message:
- reopen fifo when closed by other end
Index: defaults.h
===================================================================
RCS file: /cvsroot/lwatch/files/src/defaults.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** defaults.h 24 Mar 2003 13:43:23 -0000 1.5
--- defaults.h 27 Mar 2003 16:08:18 -0000 1.6
***************
*** 30,33 ****
--- 30,35 ----
*/
+ #include "config.h"
+
#define YES 1
#define NO 0
Index: lwatch.c
===================================================================
RCS file: /cvsroot/lwatch/files/src/lwatch.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** lwatch.c 8 Aug 2002 14:35:24 -0000 1.11
--- lwatch.c 27 Mar 2003 16:08:19 -0000 1.12
***************
*** 81,86 ****
if(errno!=EINTR) io_check(res,"poll");
if(input.revents==POLLHUP) {
! loop=0; /* end of data */
! continue;
}
if(res<1) continue;
--- 81,90 ----
if(errno!=EINTR) io_check(res,"poll");
if(input.revents==POLLHUP) {
! /* other end closed fifo */
! #ifdef DEBUG
! printf("syslog closed second end of fifo %s\nTrying to reopen\n",lw_conf.fifo_file);
! #endif
! /* trying to reopen or die */
! io_check(fd=open(lw_conf.fifo_file,O_RDONLY),lw_conf.fifo_file);
}
if(res<1) continue;
|