Hi,
Please note that vty_close has the following code:
/* Close socket. */
if (vty->fd > 0)
close (vty->fd);
else
vty_stdio_reset ();
Condition that vty->fd is greater than zero in fact means vty->fd !=
STDIN_FILENO. I decided to use the same logic in the patch and use
numeric value 2 instead of STDERR_FILENO.
--
| Evgeny Uskov | HLL l QRATOR
| mob.: +7 916 319 33 20
| skype: evgeny_uskov
| mailto: [email protected]
| visit: www.qrator.net
On Sun, Nov 26, 2017 at 8:15 PM, Balaji Gurudoss <[email protected]> wrote:
> 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 <[email protected]> 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
>>
>
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev