diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vty/vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c index 8cc2a3ae..ebdf9fc9 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -231,8 +231,8 @@ void vty_close(struct vty *vty) /* Unset vector. */ vector_unset(vtyvec, vty->fd); - /* Close socket. */ - if (vty->fd > 0 && vty->fd != fileno(stderr)) { + /* Close socket (ignore standard I/O streams). */ + if (vty->fd > 2) { close(vty->fd); vty->fd = -1; } |