Package: fnfxd Version: 0.3-5 Severity: normal When client is attached, it sometimes fail to receive an Fn-keystroke from the daemon. The problem is that daemon fails to wait for the client to read the keystroke from the shared memory segment, and starts to process a key-relese event, which follows the keypress. So if a key is pressed and released very quickly, the client misses it.
The daemon fails to wait for the client's response because the response semaphore count is always non-zero -- the client sets it to 1 on startup in case the daemon was waiting for the response from the dead client. The solution is to set the response semaphore to 0 by the daemon just before reporting an event to the client. A patch is attached. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.13-ii Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R) Versions of packages fnfxd depends on: ii libc6 2.3.5-6 GNU C Library: Shared libraries an fnfxd recommends no packages. -- no debconf information
--- fnfx-0.3/src/fnfxd_acpi.c 2004-10-12 23:03:42.000000000 +0400 +++ fnfx-0.3-modified/src/fnfxd_acpi.c 2005-09-13 14:14:53.000000000 +0400 @@ -73,6 +73,9 @@ void signal_fnfx() { + /* Reset the remnant response from the client in case there is one */ + semctl(cfg->sem.id, 2, SETVAL, 0); + cfg->sem.op.sem_num = 1; cfg->sem.op.sem_op = 1; cfg->sem.op.sem_flg = 0;