From 5171befcb122b12677f60715603be091625a9e08 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Mon, 4 Jan 2016 12:13:40 +0000 Subject: stty: support -I, --immediate to not wait for pending transmission In some cases an initial drain may block indefinitely as discussed at: http://lists.gnu.org/archive/html/coreutils/2016-01/msg00007.html * src/stty.c (main): Use TCSANOW rather than TCSADRAIN if -I specified. (usage): Document the new option. * doc/coreutils.texi (stty invocation): Likewise. * tests/misc/stty.sh: Ensure -I is supported. * NEWS: Mention the new feature. --- tests/misc/stty.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh index 666ac0b26..88d5796cf 100755 --- a/tests/misc/stty.sh +++ b/tests/misc/stty.sh @@ -35,6 +35,9 @@ 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 + # These would improperly ignore invalid options through coreutils 5.2.1. returns_ 1 stty -F 2>/dev/null || fail=1 returns_ 1 stty -raw -F no/such/file 2>/dev/null || fail=1 -- cgit v1.2.3-70-g09d2