wok-4.x view busybox/stuff/busybox-1.18-conspy.u @ rev 9579
Up: tiff to 3.9.5.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Tue Apr 12 11:37:28 2011 +0000 (2011-04-12) |
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) {