bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] pipe2: fix O_NONBLOCK support on mingw


From: Eric Blake
Subject: Re: [PATCH 4/4] pipe2: fix O_NONBLOCK support on mingw
Date: Fri, 08 Apr 2011 12:03:28 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 04/08/2011 11:33 AM, Eric Blake wrote:
> * modules/pipe2 (Depends-on): Add nonblocking.
> * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support.
> * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly.
> 
> +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
> +/* Native Woe32 API.  */
> +
> +  if (flags & O_NONBLOCK)
> +    {
> +      int result = _pipe (fd, 4096, flags & O_NONBLOCK);

Oops, that should be flags & ~O_NONBLOCK.

Also, test-pipe2 was leaking fds.

-- 
Eric Blake   address@hidden    +1-801-349-2682
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]