wok-6.x view busybox/stuff/busybox-1.18-conspy.u @ rev 11452
Add: suricata
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Dec 17 10:54:09 2011 +0100 (2011-12-17) |
parents | |
children |
line source
1 Fix esc keys leak
2 --- busybox-1.18.0/miscutils/conspy.c
3 +++ busybox-1.18.0/miscutils/conspy.c
4 @@ -506,16 +506,17 @@
5 }
6 }
7 poll_timeout_ms = 250;
8 + if (option_mask32 & FLAG(v)) continue;
10 // Insert all keys pressed into the virtual console's input
11 // buffer. Don't do this if the virtual console is in scan
12 // code mode - giving ASCII characters to a program expecting
13 // scan codes will confuse it.
14 - if (!(option_mask32 & FLAG(v)) && G.escape_count == 0) {
15 + G.key_count += bytes_read;
16 + if (G.escape_count == 0) {
17 int handle, result;
18 long kbd_mode;
20 - G.key_count += bytes_read;
21 handle = xopen(tty_name, O_WRONLY);
22 result = ioctl(handle, KDGKBMODE, &kbd_mode);
23 if (result >= 0) {