On Mon, Aug 15, 2011 at 06:42:15 -0600, Eric Blake wrote:
On 08/15/2011 01:58 AM, Jiri Denemark wrote:
> @@ -710,6 +711,23 @@ int virNetSocketGetFD(virNetSocketPtr sock)
> }
>
>
> +int virNetSocketDupFD(virNetSocketPtr sock, bool cloexec)
> +{
> + int fd;
> +
> + if (cloexec)
> + fd = fcntl(sock->fd, F_DUPFD_CLOEXEC, (long) 0);
The third argument is unneeded, and skipping it will avoid a
stupid-looking cast. But leaving it doesn't hurt either, if you already
pushed.
Ah, nice, fcntl man page didn't mention this possibility. I was just about to
push but I'll remove the argument first.
Jirka