From 125630aeab8e576bdd87c5a66ea18d8b3f583797 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 25 Jul 2018 16:40:23 -0400 Subject: Fix cfmakeraw calls It turns out that you're supposed to call cfmakeraw with a termios initialized by tcgetattr. Using an uninitialized termios resulted in hnel on NetBSD breaking the pty and causing a silent logout. --- bin/hnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/hnel.c') diff --git a/bin/hnel.c b/bin/hnel.c index 20dbd2a7..50ad6bf7 100644 --- a/bin/hnel.c +++ b/bin/hnel.c @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) { if (error) err(EX_IOERR, "tcgetattr"); atexit(restoreTerm); - struct termios raw; + struct termios raw = saveTerm; cfmakeraw(&raw); error = tcsetattr(STDERR_FILENO, TCSADRAIN, &raw); if (error) err(EX_IOERR, "tcsetattr"); -- cgit 1.4.1