|
From: | Eric Blake |
Subject: | Re: getting EBADF on MSVC |
Date: | Mon, 19 Sep 2011 16:42:52 -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/19/2011 04:37 PM, Paul Eggert wrote:
For example, it's not reasonable to replace code like this: return dup2 (a, b); with code like this: TRY_MSVC_INVAL { return dup2 (a, b); } CATCH_MSVC_INVAL { errno = EBADF; return -1; } DONE_MSVC_INVAL
I agree. Especially since the dup2 module was already trying to avoid the 'invalid argument handler' in the first place by pre-validating the fd before ever calling dup2, so that all the rest of gnulib can merely rely on the dup2 module and rpl_dup2 doing the right thing.
Fix the root of the problem (dup2), not all the callers (everyone that uses dup2).
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |