diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2018-08-09 12:43:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-09 12:43:02 -0400 |
| commit | 7a07a176cf30db569f2a4cf37a7ad8fdf9af6516 (patch) | |
| tree | 2e1ae1535f974e3e4ea35f634c918b3c314ea6cb | |
| parent | 53741000f2c89b88c0aa4bfc1691de230f42affd (diff) | |
| parent | 572e26445a84ebaeeb3d6b2e1d908b4050f44516 (diff) | |
Merge pull request #2806 from opensourcerouting/vty-term-fd
lib: fix "-t" command line option
| -rw-r--r-- | lib/vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2303,9 +2303,9 @@ void vty_close(struct vty *vty) * additionally, we'd need to replace these fds with /dev/null. */ if (vty->wfd > STDERR_FILENO && vty->wfd != vty->fd) close(vty->wfd); - if (vty->fd > STDERR_FILENO) { + if (vty->fd > STDERR_FILENO) close(vty->fd); - } else + if (vty->fd == STDIN_FILENO) was_stdio = true; if (vty->buf) |
