From cb7d8b90a213c0186a8c8ba66da959e1f5930e78 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 6 Jan 2016 14:40:03 +0000 Subject: stty: support [-]drain setting to control waiting for pending Tx Instead of commit v8.24-132-g5171bef which only provides control to disable this behavior (with -I), provide the symmetrical "[-]drain" special setting. * src/stty.c (main): Parse the [-]drain setting instead of -I, and treat like a global option. (usage): Adjust accordingly. * tests/misc/stty.sh: Test "drain" with and without options. * NEWS: Mention the new feature. --- tests/misc/stty.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh index 88d5796cf..5735b764a 100755 --- a/tests/misc/stty.sh +++ b/tests/misc/stty.sh @@ -35,8 +35,12 @@ stty $(cat $saved_state) || fail=1 # This would segfault prior to sh-utils-2.0j. stty erase - || fail=1 -# Ensure --immediate mode is supported -stty -I erase - || fail=1 +# Ensure "immediate" and "wait" mode supported, with and without settings +for mode in '-drain' 'drain'; do + for opt in 'echo' ''; do + stty "$mode" $opt || fail=1 + done +done # These would improperly ignore invalid options through coreutils 5.2.1. returns_ 1 stty -F 2>/dev/null || fail=1 -- cgit v1.2.3-70-g09d2