
23 Aug
2010
23 Aug
'10
12:59 p.m.
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/