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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=b4oXc1KTpA5Mpfj6WtEDoHTrS0168VGp2WOmwMc71XsyrofLY5w17
	pXjkQWH4qebYkGLqKPuVg7DCsJcQBxstAcD8nbK9U/aJjK3M5ijS/YcnOPPcwoAH
	2v0LCN60VfQ8Ce/SLRxHRS5Ddo7xHQEoOO2Pz70+zgvtwpz8FX8HlQ=
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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=akZhq0I28LgQHguJNG2yRVw6UgQ=; b=gnSWWMNG+h5BBxl/bWk/k3GBuujN
	f/6Ks2i8vxcnRNerUw6ORQxv0lKmeN6BD3w6CooswAqLJSmVdAgzi967JDc3W4sk
	XjwhNSWrsIdV2AfnD6ieCooJqTjA2rMTlona+2A8tLQcLa5GgP3CgJdn6eUwc3CR
	1oeOByEbt85wHGY=
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=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 17 Jan 2014 10:28:37 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: fork() + file descriptor bug in 1.7.27(0.271/5/3) 2013-12-09 11:54
Message-ID: <20140117092837.GI2831@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <831845.98759.bm@smtp116.sbc.mail.ne1.yahoo.com> <52D55D96.8070407@redhat.com> <946338.89157.bm@smtp116.sbc.mail.ne1.yahoo.com> <CAG9p0OR8JYgC1rzBCn1bvXe5ffpJS3vpmnnxw-7brJi8E8+uhQ@mail.gmail.com> <52D63CE2.9060308@lysator.liu.se> <858084.71265.bm@smtp116.sbc.mail.ne1.yahoo.com> <20140115163354.GA30234@calimero.vinschen.de> <670957.90887.bm@smtp117.sbc.mail.ne1.yahoo.com> <20140116085026.GA26205@calimero.vinschen.de> <491859.27055.bm@smtp113.sbc.mail.ne1.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="0XhtP95kHFp3KGBe"
Content-Disposition: inline
In-Reply-To: <491859.27055.bm@smtp113.sbc.mail.ne1.yahoo.com>
User-Agent: Mutt/1.5.21 (2010-09-15)

--0XhtP95kHFp3KGBe
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jan 16 23:53, tednolan@bellsouth.net wrote:
> In message <20140116085026.GA26205@calimero.vinschen.de>you write:
> >
> >Can you change your testcase another bit, please?  Enable your
> >`ftell' printf, but rather than printing the result of ftell,
> >print the result of lseek:
> >
> >  fprintf(stderr, "(%s) (%s) %d %ld\n", infile,
> >        outfile, i, lseek(fileno(fp), 0, SEEK_CUR));
> >
> >I would be curious what happens on Solaris here.
> >
>=20
> OK,
>=20
> I took the original test case and made your lseek change.  Here are
> the Solaris & FreeBSD results.
>=20
> Here is Solaris 9:
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3DSOLARIS=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Script started on Thu Jan 16 23:47:20 2014
> solabel10% ./a.out < test_data
> (00.tif) (00.eps) 1 45
> Running 0
> child
> (01.tif) (01.eps) 2 15
> Running 1
> child
> (02.tif) (02.eps) 3 0
> Running 2

Thanks!  That's exactly what happens on Cygwin as well.

I'm about to check in code to newlib which allows to choose between
Solaris/POSIX semantics to BSD/Linux semantics(*) at build time.  Since
Linux is our role model, we're going to switch to BSD/Linux semantics
for the next Cygwin release as well.


Thanks,
Corinna

(*) More precise: BSD/Glibc semantics.

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--0XhtP95kHFp3KGBe
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJS2PfFAAoJEPU2Bp2uRE+gtPIP/i0S+gQ9cVL6zpcA6SgyHd4X
0ZUyN7qSvircaa4QQPo8bEYH28lrKYW/MpIan8OFKpwqHRj2j0YnKGhfQWdSinum
I+2irDndpc2WM8in+6sF/QRK3KeVWozWNDlqKLDMpzLi56hO5nA2Wgo8FtnXpftj
t3issd8X8PgxhNw0xya8gRKQSiH1t5+xEeUWVicIhs0cLtWgWusE1V3XGLsWO84q
duahc2gZ7pLm257Iid/F1LD1Eaja2HpMjqN5ABOo84RRs1SJSY/xk/o9pP/RHy07
WwHyEZ935InCgsrjQgrKgnTWjzohbYSLM+XLePXJ3KUjg6aArHAgthgFSFB1ueMp
AQXzV1ed3VYsTDmU7WqbsjTAsjTBjHWGxKMAcqijEfkuuzto47/pr1zBjHuu5mDJ
oEsLjnAAJHJ6JXi+UI0UoDBIv+DVsqBaiSba5asBzTMlYr61TSA5B1zBzgE2oxke
0u9IBi3M4R+hnzMg7YZMRLnFD6VuARRTf2dT/0o87i6qaNXGTULOuFzt3RZdxRKa
NwbETPyHAPmbgg4X8p1rwh4ky4nqVHiCQn0mtGP+iGmLa5f9JZEG+eFv3F69F7gZ
GlmBhRKwZcW9LnF3pBRPb2QkcDp9M/pgKI/yF29VG3vtqY95i7JITEhnz7IJc3Id
pitu0sO8hoaDLOWto4YX
=h3H7
-----END PGP SIGNATURE-----

--0XhtP95kHFp3KGBe--
