mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Exit when not a tty device in autoconnect mode
This commit is contained in:
parent
58c316717f
commit
bf1f712e5e
1 changed files with 2 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue