X-Recipient: archive-cygwin@delorie.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: <20091202100433.GQ8059@calimero.vinschen.de>
References: <1NFlZ1-0LCxsG0@fwd11.aul.t-online.de>  <20091202100433.GQ8059@calimero.vinschen.de>
Date: Wed, 02 Dec 2009 12:07:36 +0100
Reply-To: "Christian Franke" <Christian.Franke@t-online.de>
To: cygwin@cygwin.com
Subject: Re: 1.7.0-67: syslog() not working properly - possible bug in   writev()  ?
From: "Christian Franke" <Christian.Franke@t-online.de>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Message-ID: <1NFn3Y-2JTP6W0@fwd06.aul.t-online.de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Corinna Vinschen wrote:
> On Dec  2 10:31, Christian Franke wrote:
> > I presume that the root of the problem is that the
> > 
> > writev(fd, { {"< PRI >", . }, { "MSG", . } }, 2) 
> > used within syslog() sends "< PRI >" and "MSG" in
> > two separate datagrams to /dev/log.
> > 
> 
> Probably not.  The "kernel:" message is generated if something is
> available on /dev/kmsg, which shouldn't be the case.  The only message
> type generated there are exceptions catched by Cygwin.  I'll have a
> look into it.  Thanks for the report.
> 
> 

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);

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

