Fixed not being able to quit

When gotty was waiting for a device to appear it was impossible to quit
using the ctrl-g ctrl-q sequence. This is now fixed.
This commit is contained in:
Martin Lund 2014-09-27 22:18:07 +02:00
parent 57beed2e34
commit 6e2582787c
4 changed files with 57 additions and 13 deletions

View file

@ -34,6 +34,9 @@ int main(int argc, char *argv[])
/* Configure output terminal */
configure_stdout();
/* Restore output terminal on exit */
atexit(&restore_stdout);
/* Connect to tty device */
if (option.no_autoconnect)
status = connect_tty();