From: jsteube Date: Thu, 30 Jun 2016 10:03:12 +0000 (+0200) Subject: Fix for PR https://github.com/hashcat/hashcat/commit/69122fb5541575f7f20e1dee855a5f9e... X-Git-Url: https://www.flypig.org.uk/git/?p=hashcat.git;a=commitdiff_plain;h=edb5028a4db4faa99a5f47b46bbc4ccf2fe017a8 Fix for PR https://github.com/hashcat/hashcat/commit/69122fb5541575f7f20e1dee855a5f9eab6f57a9 which wasn't complete --- diff --git a/src/shared.c b/src/shared.c index 2eb6097..85d4435 100644 --- a/src/shared.c +++ b/src/shared.c @@ -2341,7 +2341,7 @@ int tty_break() { struct termios modmodes; - if (ioctl (fileno (stdin), TCGETA, &savemodes) < 0) return -1; + if (tcgetattr (fileno (stdin), &savemodes) < 0) return -1; havemodes = 1; @@ -2350,7 +2350,7 @@ int tty_break() modmodes.c_cc[VMIN] = 1; modmodes.c_cc[VTIME] = 0; - return ioctl (fileno (stdin), TCSETAW, &modmodes); + return tcsetattr (fileno (stdin), TCSANOW, &modmodes); } int tty_getchar() @@ -2378,7 +2378,7 @@ int tty_fix() { if (!havemodes) return 0; - return ioctl (fileno (stdin), TCSETAW, &savemodes); + return tcsetattr (fileno (stdin), TCSADRAIN, &savemodes); } #endif