From bf1f712e5e733444a4c3fa169a2ebc5c278b4bcc Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Thu, 26 May 2016 17:15:08 +0200 Subject: [PATCH] Exit when not a tty device in autoconnect mode --- src/tty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tty.c b/src/tty.c index f18d559..8f9beb0 100644 --- a/src/tty.c +++ b/src/tty.c @@ -407,8 +407,8 @@ int tty_connect(void) /* Make sure device is of tty type */ if (!isatty(fd)) { - error_printf_silent("Not a tty device"); - goto error_isatty; + error_printf("Not a tty device"); + exit(EXIT_FAILURE);; } /* Lock device file */ @@ -537,7 +537,6 @@ int tty_connect(void) return TIO_SUCCESS; error_tcgetattr: -error_isatty: error_read: tty_disconnect(); error_open: