delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/17/15:13:18

X-Recipient: archive-cygwin AT delorie DOT 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=kWsCeU
LQc+rfKiaeKLgC253lGNFTVuuLtraVD84d8gS8jDCwl1x6JGzZ+SPtgJY8DLanLN
v1DXmGnJh7ziby5v9QJ4S2WHvvrfj29TCmbZONStQZupaHQsxg5VKsCaBqVN2KOn
fdfKPZrct/zkal9mUmki8XV5/k9cRWXegbYks=
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=cjFaxH/CGdnb
tMr4aHVFw8dG058=; b=otACFcDQLKZdNdI40A4s/csvOsfVJAN91wNpMu1xHdTF
2VrR5psDMy5QOCAHxU9NkTq3VrpzeiMPDpF3u5NSBmS5FCFsL0m9oozQ3IO46LiR
DwkF5LVsd4MvCFFVGVsu5dsztmNMiaCLBet8qpQSX3xHU8BnmLOBTihb/ZvTIP4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.6 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: <52D98ECD.8020203@redhat.com>
Date: Fri, 17 Jan 2014 13:13:01 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: fork() + file descriptor bug in 1.7.27(0.271/5/3) 2013-12-09 11:54
References: <831845 DOT 98759 DOT bm AT smtp116 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <52D55D96 DOT 8070407 AT redhat DOT com> <946338 DOT 89157 DOT bm AT smtp116 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <CAG9p0OR8JYgC1rzBCn1bvXe5ffpJS3vpmnnxw-7brJi8E8+uhQ AT mail DOT gmail DOT com> <52D63CE2 DOT 9060308 AT lysator DOT liu DOT se> <858084 DOT 71265 DOT bm AT smtp116 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com>
In-Reply-To: <858084.71265.bm@smtp116.sbc.mail.ne1.yahoo.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
X-IsSubscribed: yes

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

On 01/15/2014 08:28 AM, tednolan AT bellsouth DOT net wrote:

> Well, all I can say in this instance, is that arguably conforming to
> the bare letter of the standard (if that's in fact what is happening)
> is not "the right thing".  People certainly don't expect that stdio
> file pointers that exist at fork() time and which are never "used" by a
> child will be reset in the parent.  I mean, if they can't even be fclose(=
)-ed
> to take them out of the picture, what chance have you got? -:)
>=20
> FWIW, FreeBSD, Linux and Solaris all compile and run the test program
> with the behavoir I expect..

Rather, FreeBSD and Linux share the same behavior of having intuitive
action of not resetting the underlying fd position, but violating POSIX
in the process; while Solaris DOES reset the fd and would expose the
same undefined behavior in the sample program.

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


--eoF8LO2oOmJWghcf2UBPS41C893Bp85Eg
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/

iQEcBAEBCAAGBQJS2Y7NAAoJEKeha0olJ0NqF8EH/2EY2NeOP2dZL/u1IOnq7rFJ
jpt9BrNUoanJlPagHK61zpQm0wzdMiIW7bTyqFOW9uw/4Sg5rHu8I2Wa1fOLUhVq
Bh8TDsR/9Un4ClPugPdiX9MkTWJAiJ+B/dLDaB9PtM5BeAnSMW5vJgsEKIZXLuOn
BC8qfaJCawm0sJVOgXowowkRZMV9MJNGuDb8KzhanVA2aXXx6ztz0s4svdd53vjs
ovgDjzAlijXihCc6A5l5hqnvkVFuphaCvzhD6u9WsdQZE37UcWmSzS2dWwqOUleM
/wPJBZChcL3OxFq4wGZ2MFX1yOe85b7dtIhBg4i7f3cjSB3ZvYaxTbw0pau5MYI=
=MGFk
-----END PGP SIGNATURE-----

--eoF8LO2oOmJWghcf2UBPS41C893Bp85Eg--

- Raw text -


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