This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 1.7.0-67: syslog() not working properly - possible bug in writev() ?
Corinna Vinschen wrote:
> On Dec ?2 12:07, Christian Franke wrote:
> >
> > Another test:
> >
> > This sends one UDP package on 1.5, but two on 1.7:
> >
> > int sd = socket(AF_LOCAL, SOCK_DGRAM, 0);
> >
> > struct sockaddr_un sa; sa.sun_family = AF_LOCAL;
> > strcpy(sa.sun_path, "/dev/log");
> > connect(sd, (struct sockaddr *)&sa, sizeof(sa));
> >
> > struct iovec iv[2] = { { "<1>", 3 }, { "test: text", 10 } };
> > writev(sd, iv, 2);
>
> Yes, but... why is that a problem for syslog-ng? ?Shouldn't it have to
> expect that a message comes in multiple UDP packages? ?Hmm.
>
>
At least the old syslogd prints one message for each recvfrom() result.
If "< PRI > MESSAGE" is sent in 2 packages, the result is one empty
message with facility.level=PRI and another MESSAGE with
facility.level=default.
Christian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple