mirror of
https://git.savannah.gnu.org/git/screen.git
synced 2026-04-20 18:56:50 +02:00
check if we succeeded in SttyMode
should detect invalid parameters, like bad baud modes Bug: 50849
This commit is contained in:
@@ -132,7 +132,14 @@ int OpenTTY(char *line, char *opt)
|
||||
*/
|
||||
InitTTY(&Mode, W_TYPE_PLAIN);
|
||||
|
||||
SttyMode(&Mode, opt);
|
||||
|
||||
if (SttyMode(&Mode, opt)) {
|
||||
Msg(errno, "%s: stty failed - invalid option?", line);
|
||||
alarm(0);
|
||||
xsignal(SIGALRM, sigalrm);
|
||||
close(f);
|
||||
return -1;
|
||||
}
|
||||
SetTTY(f, &Mode);
|
||||
|
||||
#if defined(TIOCMSET)
|
||||
|
||||
Reference in New Issue
Block a user