Subject: bug#20127: bug in stty

From: Pádraig Brady <[email-masked]>
Date: Wed, 18 Mar 2015 10:17:34 +0000

tag 20127 notabug
close 20127
stop

On 17/03/15 19:33, Morris Keesan wrote:
> stty --version:
> stty (GNU coreutils) 8.13
> 
> uname -a:
> Linux ice4 3.2.0-75-generic #110-Ubuntu SMP Tue Dec 16 19:11:55 UTC 
> 2014 x86_64 x86_64 x86_64 GNU/Linux
> ==================================================================
> bug:
>        stty erase ''
> sets erase to <undef>.  This may be intentional, but seems like a bug, since
> this behavior is undocumented, and the stty man page says,
> "special values ^- or undef used to disable special characters."
> 
> I haven't bothered testing, but I assume that an empty argument gets treated
> as undef for all special characters.

Yes, that's the same for all special characters.
Also Solaris and FreeBSD have the same behavior.
However I'm not sure it should be documented,
as the NUL character is being taken literally in this case,
and it happens to match the _POSIX_VDISABLE character.
This may change in future, so I would stick to the
documented interfaces.

thanks,
Pádraig.