diff options
author | June McEnroe <june@causal.agency> | 2018-07-25 16:40:23 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-07-25 16:40:23 -0400 |
commit | 8a58379ece89299bd831d92706da67499eb01225 (patch) | |
tree | f93bbbc6a443b1657d8e001967003c0194c956bb /bin/modem.c | |
parent | Remove nasm from install (diff) | |
download | src-8a58379ece89299bd831d92706da67499eb01225.tar.gz src-8a58379ece89299bd831d92706da67499eb01225.zip |
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.
Diffstat (limited to 'bin/modem.c')
-rw-r--r-- | bin/modem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/modem.c b/bin/modem.c index 4b5e8eb2..394ebb72 100644 --- a/bin/modem.c +++ b/bin/modem.c @@ -47,7 +47,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(STDIN_FILENO, TCSADRAIN, &raw); if (error) err(EX_IOERR, "tcsetattr"); |