[Top][All Lists]

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

Re: [PATCH] execute: drop dead code

From: Eric Blake
Subject: Re: [PATCH] execute: drop dead code
Date: Wed, 06 Mar 2013 06:18:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

On 03/05/2013 06:10 PM, Bruno Haible wrote:
> Hi Eric,
> OK for the argumentation for the POSIXy systems. But for the Windows/mingw
> libc, I would be more careful. mingw is a moving target (it moves closer
> towards POSIX over time), and has EINTR. It is not unreasonable to expect
> that EINTR for open() or close() may occur in mingw at some point.
> Btw, in my experience, in many documentation pages of Windows API and
> Microsoft libc functions, there is at least one detail in the documentation
> that does not match the actual behaviour. Therefore, just because the doc
> doesn't mention EINTR as a possible return code, doesn't mean that EINTR
> cannot occur as a return code.
>> * lib/execute.c (nonintr_close, nonintr_open): Delete.
> I would have changed the
>   #ifdef EINTR
> to
>   #if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined 
> __CYGWIN__)
> similar to the approach taken in lib/spawn-pipe.c, which is a "brother" of 
> lib/execute.c.
> Are you OK with this partial revert?

Sure; that seems reasonable, and also avoids the warning.  But since we
already have an #if ((defined _WIN32 || defined __WIN32__) && ! defined
__CYGWIN__) condition, and know that EINTR is defined, why not just move
the entire block of code into the one condition where it is used instead
of going through a complex condition to define it?

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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