mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add option --no-tty-restore / -N that omits tty_restore() call #334
On exit, do not reset the tty device settings to the state they were in before the program started. This is effective when sending characters at a low baud rate and then immediately exiting, to ensure that the last character is output correctly.
This commit is contained in:
parent
e73ff6d208
commit
c74273ecaa
9 changed files with 34 additions and 3 deletions
|
|
@ -2706,10 +2706,13 @@ int tty_connect(void)
|
|||
rs485_mode_enable(device_fd);
|
||||
}
|
||||
|
||||
/* Make sure we restore tty settings on exit */
|
||||
/* Make sure we restore tty settings on exit unless ordered to keep current settings */
|
||||
if (first)
|
||||
{
|
||||
atexit(&tty_restore);
|
||||
if (option.no_tty_restore == false)
|
||||
{
|
||||
atexit(&tty_restore);
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue