delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/02/10:34:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20091202141753.GR8059@calimero.vinschen.de>
References: <1NFlZ1-0LCxsG0 AT fwd11 DOT aul DOT t-online DOT de> <20091202100433 DOT GQ8059 AT calimero DOT vinschen DOT de> <1NFn3Y-2JTP6W0 AT fwd06 DOT aul DOT t-online DOT de> <20091202141753 DOT GR8059 AT calimero DOT vinschen DOT de>
Date: Wed, 02 Dec 2009 16:16:44 +0100
Reply-To: "Christian Franke" <Christian DOT Franke AT t-online DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0-67: syslog() not working properly - possible bug in writev() ?
From: "Christian Franke" <Christian DOT Franke AT t-online DOT de>
Message-ID: <1NFqwe-2DY1lQ0@fwd08.aul.t-online.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019