Exit when not a tty device in autoconnect mode

This commit is contained in:
Martin Lund 2016-05-26 17:15:08 +02:00
parent 58c316717f
commit bf1f712e5e

View file

@ -407,8 +407,8 @@ int tty_connect(void)
/* Make sure device is of tty type */ /* Make sure device is of tty type */
if (!isatty(fd)) if (!isatty(fd))
{ {
error_printf_silent("Not a tty device"); error_printf("Not a tty device");
goto error_isatty; exit(EXIT_FAILURE);;
} }
/* Lock device file */ /* Lock device file */
@ -537,7 +537,6 @@ int tty_connect(void)
return TIO_SUCCESS; return TIO_SUCCESS;
error_tcgetattr: error_tcgetattr:
error_isatty:
error_read: error_read:
tty_disconnect(); tty_disconnect();
error_open: error_open: