X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; q=dns; s=default; b=Y2POGw
	YbakzeA5+uTspZpgSe9AxV3ob0Sg+6mbOrQgJLYI4ZRnrx/oZL6PNt6HR4rl6fGe
	9LYh4T18Oa5WjP/QWGOI1iGkCD261H6bPMomBibzIjdODB+WxvNkF1RmHA44uRdu
	J2Z/jz9RHUNFCCof7cWt0JCC12iFlGmh75/E8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; s=default; bh=6pci7UsjJDq0
	iIxeFYuBMt4zOV8=; b=PHaHpmSgskLQk8CJhyzdiwVi3j2Rg61tpriZzwZjw5vO
	HEZhmVi/4OlXGs7001pdQXkKqDrb49y+VhegcCU5ZyGt8ck1aSzkd5nS6+q74eiv
	Ut100oA4qNVdChFPC3ofhGi7XR2+n926Mt63h5wwMImvgHYoZzBDWDPIqk3MhdY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Message-ID: <5357DEE4.1080802@redhat.com>
Date: Wed, 23 Apr 2014 09:40:20 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cygwin's writev() non-standard behavior
References: <20140423145338.163340@gmx.com>
In-Reply-To: <20140423145338.163340@gmx.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0R6gkWoJtv7qKGheWpviAD8EwgDV1lIbi"
X-IsSubscribed: yes

--0R6gkWoJtv7qKGheWpviAD8EwgDV1lIbi
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 04/23/2014 08:53 AM, qq qq wrote:

[your mailer should really be taught to use In-Reply-To correctly; it's
annoying that every message from you starts a new thread]

>> furthermore, cygwin should emulate Linux behavior, even if POSIX
>> doesn't define the behavior.
>=20
> And which is why I compared Linux vs. Cygwin in my original post ?

If you'll note, I was trying to be careful in my reply - I'm not opposed
to a change in cygwin, and in fact welcome one to bring us into
consistency with Linux behavior; but at the same time, I'm also pointing
out that your program is not portable and therefore it may be worth
fixing the portability assumptions in your program instead of waiting on
cygwin to provide the specific undefined behavior that you want to use.

> int main()
> {
>   struct iovec vec;
>   int fd =3D open("test.out", O_WRONLY | O_CREAT, 0666);
>   memset(&vec, 0, sizeof(vec));
>   if (writev(fd, &vec, 0) < 0)

POSIX allows, but not requires, writev() to fail with EINVAL when iovcnt
is 0.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--0R6gkWoJtv7qKGheWpviAD8EwgDV1lIbi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJTV97kAAoJEKeha0olJ0NqMfcH/1nv9NgVK+L1CzMZAJDdqlBl
LiDglhiiK4qJYseXaqxcOIoyJi+iUcIeHlXwGPJlNxqZGSaizDqBrtbW9mPZqDcf
1wecOWwX9KBYkdLx4Bl0X8u8QpO76mBsZILKriI2baAM3uiSUurlsbSDmuFHq2BM
KGZW0zocYuWBlcefQPUfMXzgM7KPsHm6q/rWwrAgdQQNXWWAUWTh5N/BzLZzUspf
DbMKWDf8EX2+jbw37JYeW7H5DWwBtQx8EvGdebjParbCTwOOxoMet1vNN6ra7rS2
Z+8QveNDWdWn6tgw7i4ZzcYF8XIdRHlG720jI1PF110/Njk43gEmtatL3W6emBw=
=rLCc
-----END PGP SIGNATURE-----

--0R6gkWoJtv7qKGheWpviAD8EwgDV1lIbi--
