Pádraig Brady <[email protected]> writes: > stty current fails like: > > $ stty 9600 > $ saved=$(stty -g) > $ stty 19200 "$saved" # Sets 9600 but reports failure > stty: 'standard input': unable to perform all requested operations > > Whereas these work fine: > > $ stty 19200 9600 > $ stty "$saved" 19200 > > * NEWS: Mention the bug fix. > * src/speedgen (cbaud_to_speed): Determine the speed > from the control flag encoding. > * src/stty.c (recover_mode): If no separate speed specified, > update the speed from the specified control flags. > * tests/stty/stty-save-speed.sh: Add test cases. > --- > NEWS | 6 ++++++ > src/speedgen | 32 ++++++++++++++++++++++++++++++++ > src/stty.c | 28 ++++++++++++++++++++++++---- > tests/stty/stty-save-speed.sh | 29 +++++++++++++++++++++++++++++ > 4 files changed, 91 insertions(+), 4 deletions(-)
Nice, I ran into this yesterday and was a bit confused. Both changes look good to me. But my knowledge of termios is minimal, if any, so I wouldn't give my opinion too much weight. :) Collin
