summaryrefslogtreecommitdiff
path: root/tests/misc/stty.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-01-04 12:13:40 +0000
committerPádraig Brady <P@draigBrady.com>2016-01-04 23:45:19 +0000
commit5171befcb122b12677f60715603be091625a9e08 (patch)
tree6f1dd7bdfb491ea7037204227804a2ed6c1f3df3 /tests/misc/stty.sh
parentc6be0b39437890876692606c233b47a1751b40e9 (diff)
downloadcoreutils-5171befcb122b12677f60715603be091625a9e08.tar.xz
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.
Diffstat (limited to 'tests/misc/stty.sh')
-rwxr-xr-xtests/misc/stty.sh3
1 files changed, 3 insertions, 0 deletions
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