bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain so


From: Paolo Bonzini
Subject: Re: [PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain sockets
Date: Fri, 04 Mar 2011 17:17:23 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 03/03/2011 10:33 PM, Eric Blake wrote:
I just createdhttp://sourceware.org/bugzilla/show_bug.cgi?id=12539  - it
would be nice if the kernel and glibc would give us a way to atomically
set the FD_CLOEXEC flag on fd's created by recvfd.  But even without
atomic support from the kernel, it would be nice for gnulib to provide
provide something like recvfd2(int sock, int flags), where flags can be
O_CLOEXEC (or maybe SOCK_CLOEXEC), as a way to set it as soon as
possible after receiving the fd, in anticipation of the kernel catching
up and providing such an interface.

Good idea. This is already implemented in the kernel as MSG_CMSG_CLOEXEC, but I like mapping it to O_CLOEXEC in the gnulib API.

Paolo



reply via email to

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