Commit b47ddf1e authored by Christian Weisgerber's avatar Christian Weisgerber Committed by Matthieu Herrb

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's avatarMatthieu Herrb <matthieu@herrb.eu>
parent 3f007b38
...@@ -256,7 +256,7 @@ setRawTermios(void) ...@@ -256,7 +256,7 @@ setRawTermios(void)
rc = tcgetattr(0, &tio); rc = tcgetattr(0, &tio);
if (rc < 0) if (rc < 0)
return rc; 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); tio.c_iflag &= (unsigned) ~(ICRNL | IXOFF | IXON | ISTRIP);
#ifdef ONLCR #ifdef ONLCR
tio.c_oflag &= (unsigned) ~ONLCR; tio.c_oflag &= (unsigned) ~ONLCR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment