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

Re: [libvirt] [PATCH] Allow chardev of type 'file' for UML domains.



On 23-08-2010 12:42, Daniel P. Berrange wrote:
>> +    /*
>> +     * At the moment, the only thing that populates keepfd is
>> +     * umlBuildCommandLineChr. We want to close every fd it opens.
>> +     */
>> +    openmax = sysconf (_SC_OPEN_MAX);
>> +    for (i = 0; i < openmax; i++)
>> +        if (FD_ISSET(i, &keepfd))
>> +            close(i);
>> +
> Unfortunately fdset is one of those limited types that can't
> represent all possible values. So you need to use FD_SETSIZE
> instead of _SC_OPEN_MAX here

Ok, I'll fix that up, but just so that I understand: Your concern is
that there might be an open file descriptor between FD_SETSIZE and
_SC_OPEN_MAX that we don't want to close?

-- 
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/


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