Mail Archives: cygwin/2014/01/16/03:50:49
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Jan 15 23:42, tednolan AT bellsouth DOT net wrote:
> >> FWIW, FreeBSD, Linux and Solaris all compile and run the test program
> >> with the behavoir I expect..
> >
> >Just for completeness: I can test on Linux, but not on FreeBSD and
> >Solaris. Does the testcase also work as expected on both of them,
> >after you added fclose to the child? On Linux it does.
> >
> >
> >Thanks,
> >Corinna
> >
>=20
> Well, it appears I spoke too soon about Solaris. I saw that it terminated
> rather than running forever, and assumed it was working correctly.
> That turns out not to be the case: For 3 lines in the input file, it some=
how
> gets up to 8 processes before terminating.
>=20
> Here's what I can say per OS:
>=20
> FreeBSD 4.9
> FreeBSD 8.1
> FreeBSD 9.1
>=20
> Original test case works.
> Test case with fclose() works
> Test case with _exit() instead of exit() works
>=20
> Solaris 9:
>=20
> Original test case fails (but terminates)
> Test case with fclose() fails
> Test case with _exit() instead of exit() works
>=20
> Cygwin:
> Original test case fails (never terminates)
> Test case with fclose() fails
> Test case with _exit() instead of exit() works
>=20
> Gentoo Linux:
> Original test case works
> Test case with fclose() -- don't have access right now
> Test case with _exit() instead of exit() -- don't have access rght now
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.
> So, as per other posters, exit() is wrong and should be _exit(). I accept
> that, and will fix it, but it still seems to be that the Linux and FreeBSD
> behavior is better here. If the spec allows "spooky action at a distance=
",
> that's not the same as encouraging it..
Well, not quite. In theory, Linux is our role model for this kind of
behaviour, so I would opt for changing that to follow Linux. It's an
easy patch, but it's a bit dangerous, because the code in question is
shared with newlib, so a change affects a lot of other targets as well.
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJS151SAAoJEPU2Bp2uRE+g8dAP/24AhZKhvYOjuF3k7p2OYOws
5qaCTZ/B3TI+jbJp2K/N2zDuebvA3RUU1CN+CdvJcuY9sIzHyjWeetdlpuTkb79V
lcCzFBBHl9mcqGO6yiTpb2wsejC7VSojyEsFKuoRu9Dl+vTA74e/DmanGt+WZY0z
blCXt/CE9+Oo1XwtCB1FDBCKUJa11JIMwBpwk1nNjqsihB/peD3fgCcg4U1ThRnf
Pkw/myRz56iQbGw4v4lxB59TSYrbh8q0uxxWt4C2dC+wcMsK7i+4XPRJuiOvyy6f
YDW6S5DUqx2MeSv4qJT9R0W+oH5gxvE1qGOKQFiRlVLUJlijGxrMUXa7rx6oCcIX
RKYGvdv5eIrWAO2IJBSiXTb3fo1nSDRIfMUszZT+fD/myUS3Gn5ppmw973va0bbn
D5stmU0R9rdocsEYkiR+UpSP9I4Ik0y0YICG1Ma8Hg7cTbBtuwkUqV6G8elqFBVA
Ec69aQrPE5odmOXeV+NMN12KsK1gDgH57i87KuqwZWyORCg0lIvN1qHvAhmAYUCW
GMzOr9PqMR8GBuxL1Zb131ZqYDY6g7AZBB2f0CNOCSEpOAdHDbVFj53ui1425kti
FHKIUKQ7qSqANVNCnGhSucR2xmTTOZJivhGk05bDU6Ny0oKW+Ac5fci+q2ae/fti
k5WO+yA72kM9/h1lE+0d
=846I
-----END PGP SIGNATURE-----
--BXVAT5kNtrzKuDFl--
- Raw text -