bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fdopen on MSVC


From: Eric Blake
Subject: Re: fdopen on MSVC
Date: Mon, 26 Sep 2011 16:48:34 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.22) Gecko/20110906 Fedora/3.1.14-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.14

On 09/26/2011 04:40 PM, Bruno Haible wrote:

On glibc systems (and probably many others as well), the invalid file
descriptor is already caught by fdopen(). But there is no guarantee that
all systems do this.

But this is gnulib. _We_ can make that guarantee for all systems, via the fdopen module, since systems that return a FILE* that cannot work will interfere with developers who assumed glibc semantics that fdopen() will properly fail. A first start would be to enhance the fdopen unit test to flush out any systems that do not have glibc semantics, to see if we have to even worry about the may fail aspect of the POSIX wording in the first place.

In fact, I may even open a POSIX bug to strengthen that into a shall fail, if we can't come up with a counterexample platform.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]