[syslinux] CMENU file handling problems.
arcarlini at iee.org
arcarlini at iee.org
Mon Dec 6 15:15:55 PST 2010
arcarlini at iee.org wrote:
> H. Peter Anvin wrote:
>> Sounds like some kind of file descriptor leak, indeed. The number 29
>> is particularly suspicious: 32-3 (for stdin/stdout/stderr).
>
> I added some debug (dumping C if (__file_info[i].iop == 0 &&
> __file_info[i].oop == 0), o otherwise).
I have to dash now, but can it be as simple as this:
com32/lib/sys/open.c
roundabout line 65:
handle = __com32.cs_pm->open_file(pathname, &fp->i.fd);
if (handle < 0) {
close(fd); // brackets plus this line?
return -1;
}
So the open-file call fails and an error is returned but the fd never
got closed?
(Sorry - I'd do a proper patch but I really have to go ... if this looks
like a reasonable fix I'll happily put together a patch if someone
points me to some instructions ...).
Cheers,
Antonio
arcarlini at iee.org
More information about the Syslinux
mailing list