From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17689 invoked by alias); 23 Apr 2014 14:53:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17667 invoked by uid 89); 23 Apr 2014 14:53:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_20,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 23 Apr 2014 14:53:43 +0000 Received: from mailout-eu.gmx.com ([10.1.101.211]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MDjZQ-1Whx9h33gU-00H5Ai for ; Wed, 23 Apr 2014 16:53:39 +0200 Received: (qmail 24908 invoked by uid 0); 23 Apr 2014 14:53:39 -0000 Received: from 108.51.190.55 by rms-eu002.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Wed, 23 Apr 2014 14:53:00 -0000 From: "qq qq" Message-ID: <20140423145338.163340@gmx.com> MIME-Version: 1.0 Subject: Re: Cygwin's writev() non-standard behavior To: cygwin@cygwin.com x-registered: 0 Content-Transfer-Encoding: 8bit X-SW-Source: 2014-04/txt/msg00513.txt.bz2 > furthermore, cygwin should emulate Linux behavior, even if POSIX > doesn't define the behavior. And which is why I compared Linux vs. Cygwin in my original post ? > so your argument is flawed - you have triggered undefined behavior. Same difference: $ cat test.c #include #include #include #include #include #include int main() {  struct iovec vec;  int fd = open("test.out", O_WRONLY | O_CREAT, 0666);  memset(&vec, 0, sizeof(vec));  if (writev(fd, &vec, 0) < 0)    perror("writev");  return 0; } Linux: $ gcc -Wall test.c $ ./a.out Cygwin: $ gcc -Wall test.c $ ./a.exe writev: Invalid argument -- 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