[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] Don't leak file descriptors

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] Don't leak file descriptors
Date: Mon, 16 Nov 2009 13:47:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4

Am 13.11.2009 22:05, schrieb Blue Swirl:
> On Fri, Nov 13, 2009 at 5:17 PM, Kevin Wolf <address@hidden> wrote:
>> We're leaking file descriptors to child processes. Set FD_CLOEXEC on file
>> descriptors that don't need to be passed to children to stop this 
>> misbehaviour.
>> -        c = accept(s, (struct sockaddr *)&addr, &addrlen);
>> +        c = qemu_accept(s, (struct sockaddr *)&addr, &addrlen);
> Would it be possible to improve the interface so that no casts are
> needed for the calling code?

How exactly would you do that? The only way I see to do it would be
using void*, but I'm not sure if this really is an improvement.


reply via email to

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