diff options
author | Christian Weisgerber <naddy@mips.inka.de> | 2016-01-13 21:46:29 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2016-01-13 21:46:29 +0100 |
commit | b47ddf1e1ca6fca8b7888bdf4d7507381262d0c3 (patch) | |
tree | 25ccccf68c4796f9692956650a738156f6c72de5 | |
parent | 3f007b38a3951dd4f8d5c3ccc247ebeed4b9a8c6 (diff) |
Fix LNEXT handling on BSD
http://marc.info/?l=openbsd-misc&m=145123363601391&w=2
We need to turn off IEXTEN to make the tty transparent. I thought
ICANON would cover this (as it does on Linux), but apparently it's a
BSD-ism that LNEXT operates independently of ICANON. That isn't a bug
either; both the OpenBSD code and the rather different FreeBSD code
explicitly handle it this way.
IEXTEN is part of POSIX, even if the actual behavior is
"implementation-defined", so I don't think it needs an ifdef.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
-rw-r--r-- | sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -256,7 +256,7 @@ setRawTermios(void) rc = tcgetattr(0, &tio); if (rc < 0) return rc; - tio.c_lflag &= (unsigned) ~(ECHO | ICANON | ISIG); + tio.c_lflag &= (unsigned) ~(ECHO | ICANON | IEXTEN | ISIG); tio.c_iflag &= (unsigned) ~(ICRNL | IXOFF | IXON | ISTRIP); #ifdef ONLCR tio.c_oflag &= (unsigned) ~ONLCR; |