inetd fd leak?
Doug Graham
dgraham at nortel.com
Fri Sep 4 17:09:54 UTC 2009
Cathey, Jim wrote:
> I didn't think vforked children shared fd's, only memory maps.
> So correct me if I'm wrong, but the problem is that the
> child side changed a global, not that it closed the file.
> So why not just close the file descriptor on the child side
> _without_ changing any globals, like state variables or
> buffered I/O streams? Then it'd be safe even if it _was_
> missing FD_CLOEXEC.
>
This isn't just an academic question. uClibc 0.9.30 doesn't set FD_CLOEXEC
on the logging descriptor.
--Doug.
More information about the busybox
mailing list