[libvirt] [PATCH] rpc: retry to call dup() if fcntl with CLOEXEC fails

Eric Blake eblake at redhat.com
Wed Dec 14 13:14:29 UTC 2011


On 12/14/2011 04:19 AM, dongsu.park at profitbricks.com wrote:
> From: Dongsu Park <dongsu.park at profitbricks.com>
> 
> If fcntl with F_DUPFD_CLOEXEC fails, we need to try again to use dup()
> to get the fd, instead of giving up right away.

NACK.  gnulib guarantees that F_DUPFD_CLOEXEC works (albeit not
atomically), even on systems where it is not implemented natively.
Falling back to dup() is worthless, since gnulib already provided the
necessary fallbacks as part of its rpl_fcntl.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111214/ea71da5c/attachment-0001.sig>


More information about the libvir-list mailing list