[quagga-dev 16678] Re: bgpd: fix file descriptor leaks in vty_close

Balaji Gurudoss balajig81 at gmail.com
Sun Nov 26 17:15:55 GMT 2017


I think we should be good if we check wfd is greater than STDERR_FILENO &&
also check if the vty->wfd if its not equal to vty->fd



On Sun, Nov 26, 2017 at 10:34 PM, Nick Hilliard <nick at inex.ie> wrote:

> Balaji Gurudoss wrote:
> > Can we use the macros(STDERR_FILENO/STDERR_FILENO) defined in uinstd.h
> > for this so that its easier :)
>
> sure, but you'd need to check against STDIN_FILENO, STDOUT_FILENO and
> STDERR_FILENO, which is a bit a mouthful.  Maybe a comment explaining
> what's going on would be more useful?  It's not like any of the stdio
> filenos are going to change any time soon.
>
> Nick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20171126/ef54b006/attachment.html>


More information about the Quagga-dev mailing list