wok-stable view busybox/stuff/busybox-1.18-conspy.u @ rev 12002
clex: new icon
author | Samuel Trassare <samuel_trassare@yahoo.com> |
---|---|
date | Mon Mar 05 08:55:01 2012 -0800 (2012-03-05) |
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) {