X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Wed, 02 Dec 2009 10:31:59 +0100 Reply-To: "Christian Franke" To: "Cygwin" Subject: 1.7.0-67: syslog() not working properly - possible bug in writev() ? From: "Christian Franke" Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <1NFlZ1-0LCxsG0@fwd11.aul.t-online.de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com syslog() produces bogus lines in /var/log/messages. Testcase (with syslog-ng): $ echo -e 'one\ntwo\nthree' | logger -t test $ tail /var/log/messages ... Dec 2 10:12:31 localhost kernel: Dec 2 10:12:31 localhost test: one Dec 2 10:12:31 localhost kernel: Dec 2 10:12:31 localhost test: two Dec 2 10:12:31 localhost kernel: Dec 2 10:12:31 localhost test: three I presume that the root of the problem is that the writev(fd, { {"", . }, { "MSG", . } }, 2) used within syslog() sends "" and "MSG" in two separate datagrams to /dev/log. 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