bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] accept4: Support SOCK_NONBLOCK, if defined


From: Richard W.M. Jones
Subject: Re: [PATCH] accept4: Support SOCK_NONBLOCK, if defined
Date: Tue, 20 Aug 2019 19:01:50 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Aug 20, 2019 at 11:37:27AM -0500, Eric Blake wrote:
> +#if SOCK_CLOEXEC
> +  if (flags & SOCK_NONBLOCK)
> +    {
> +      int fcntl_flags;
> +
> +      if ((fcntl_flags = fcntl (fd, F_GETFL, 0)) < 0
> +          || fcntl (fd, F_SETFL, fcntl_flags | O_NONBLOCK) == -1)

Can't this call set_nonblocking_flag (fd)?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW



reply via email to

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