From dfae7822006074d145dd7f2e4c88a9419604f9d9 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 29 Jun 2016 09:49:01 +0100 Subject: stty: fix sane setting of susp to ^z on Solaris * src/stty.c: Disable setting of "swtch" to ^z as that conflicts with and disables using ^z as "susp". * NEWS: Mention the bug fix. Reported and tested by Rich Burridge at: http://bugs.gnu.org/23866 --- NEWS | 3 +++ src/stty.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index bfaf2399e..e03952e85 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,9 @@ GNU coreutils NEWS -*- outline -*- stty --help no longer outputs extraneous gettext header lines for translated languages. [bug introduced in coreutils-8.24] + stty "sane" again sets "susp" to ^z on Solaris, and leaves "swtch" undefined. + [This bug previously fixed only on some older Solaris systems] + seq now immediately exits upon write errors. [This bug was present in "the beginning".] diff --git a/src/stty.c b/src/stty.c index 44cdcddc6..467f8ae89 100644 --- a/src/stty.c +++ b/src/stty.c @@ -118,9 +118,9 @@ # define CSWTCH _POSIX_VDISABLE #endif -/* SunOS 5.3 loses (^Z doesn't work) if 'swtch' is the same as 'susp'. +/* SunOS >= 5.3 loses (^Z doesn't work) if 'swtch' is the same as 'susp'. So the default is to disable 'swtch.' */ -#if defined __sparc__ && defined __svr4__ +#if defined __sun # undef CSWTCH # define CSWTCH _POSIX_VDISABLE #endif -- cgit v1.2.3-54-g00ecf