On 01/15/2014 08:28 AM, tedno...@bellsouth.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? -:) > > 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature