Re: syslogd libevent

2014-10-04 Thread Alexander Bluhm
On Sat, Oct 04, 2014 at 09:03:58AM +0100, Nicholas Marriott wrote: > This should be: > > LDADD= -levent > DPADD= ${LIBEVENT} > > Rather than LDFLAGS. Here is the updated diff. Index: usr.sbin/syslogd/Makefile === RCS file: /data/

Re: syslogd libevent

2014-10-04 Thread Nicholas Marriott
On Sat, Oct 04, 2014 at 01:29:21AM +0200, Alexander Bluhm wrote: > Hi, > > After some preparation, I can convert syslogd to use libevent now. > > ok? > > bluhm > > Index: usr.sbin/syslogd/Makefile > === > RCS file: /data/mirror/ope

Re: syslogd libevent

2014-10-03 Thread Alexander Bluhm
Hi, After some preparation, I can convert syslogd to use libevent now. ok? bluhm Index: usr.sbin/syslogd/Makefile === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/syslogd/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5

Re: syslogd libevent

2014-09-26 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > try to pull parts of the diff into separate changes to make review > easier. Also in debug mode, close nullfd when it is not needed anymore. ok? bluhm Index: usr.sbin/syslogd/privsep.c ===

Re: syslogd libevent

2014-09-26 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > With this diff all my regression tests for syslogd pass. I will > try to pull parts of the diff into separate changes to make review > easier. I have not tested the syslogc feature yet. So I will write > more tests before committ

Re: syslogd libevent handler

2014-09-04 Thread Alexander Bluhm
On Wed, Sep 03, 2014 at 04:34:47PM -0700, Doug Hogan wrote: > On Sun, Aug 31, 2014 at 10:46:50PM +0200, Alexander Bluhm wrote: > > Move the handlers for the poll events into separate functions. They > > will become the libevent callbacks later. > ... > > > + udp_read_han

Re: syslogd libevent handler

2014-09-03 Thread Doug Hogan
On Sun, Aug 31, 2014 at 10:46:50PM +0200, Alexander Bluhm wrote: > Move the handlers for the poll events into separate functions. They > will become the libevent callbacks later. ... > @@ -631,23 +606,65 @@ main(int argc, char *argv[]) > > for (i = 0; i < nfunix; i++) { >

Re: syslogd libevent handler

2014-09-03 Thread Alexander Bluhm
On Sun, Aug 31, 2014 at 10:46:50PM +0200, Alexander Bluhm wrote: > On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > > I will try to pull parts of the diff into separate changes to > > make review easier. > > Move the handlers for the poll events into separate functions. They > w

Re: syslogd libevent

2014-09-03 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > So I will write more tests before committing this. My regression tests found a bug in syslogd. When adding the maximum number of paths with the -a option, the arrays for unix domain socket paths and the poll file descriptors overf

Re: syslogd libevent

2014-08-31 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > I will try to pull parts of the diff into separate changes to > make review easier. The reapchild() signal handler collects all children. This can be done easier by ignoring SIGCHLD. ok? bluhm Index: usr.sbin/syslogd/syslogd.c

Re: syslogd libevent handler

2014-08-31 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > I will try to pull parts of the diff into separate changes to > make review easier. Move the handlers for the poll events into separate functions. They will become the libevent callbacks later. ok? bluhm Index: usr.sbin/syslogd

Re: syslogd libevent

2014-08-31 Thread Alexander Bluhm
On Fri, Aug 29, 2014 at 11:25:52PM +0200, Alexander Bluhm wrote: > I will try to pull parts of the diff into separate changes to make review > easier. Let's start with an obvious bug. Do not call free() on an array in the data section. Fortunately the code was not reached. No binary change. ok

syslogd libevent

2014-08-29 Thread Alexander Bluhm
Hi, I am currently working on converting syslogd to libevent. Theo recommended to do that before adding tcp and tls support. With this diff all my regression tests for syslogd pass. I will try to pull parts of the diff into separate changes to make review easier. I have not tested the syslogc