]> git.ipfire.org Git - thirdparty/coreutils.git/commit
stty: fix setting of 'extproc' on BSD
authorPádraig Brady <P@draigBrady.com>
Thu, 12 Feb 2015 03:11:36 +0000 (03:11 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 17 Feb 2015 03:03:23 +0000 (03:03 +0000)
commit321bd11352d1f378128d65746852e073f86319d3
tree57cfd9397cf9806c2d122c116167b6cd44384416
parent3d4daddc7041724fc92b33d9495afa395cc5d995
stty: fix setting of 'extproc' on BSD

This setting is unusual on BSD as it's read normally in the local
flags returned by tcgetattr(), but can only be set with an ioctl.
Setting with tcsetattr() is ignored.

* src/stty.c (NO_SETATTR): A new flag to indicate the setting
is read and displayed like a normal termios flag, but is set
in some other manner.
(main): Skip tcsetattr() for this setting when this flag is set.
Also fixup the exiting 'extproc' processing to handle the
'-extproc' case correctly.
(sane_mode): Skip setting '-extproc' for 'sane' to avoid the error.
This isn't ideal but matches the operation of the BSD native stty.
src/stty.c