Package: wmfrog Version: 0.2.0-1 Severity: normal Src/wmFrog.c contains the following lines: ... #define DELAY 100000L ... int main(int argc, char *argv[]) { ... while(1) { ... usleep(DELAY); } ...
This makes wmfrog wake up 10 times per second and thus has a noticeable impact on the power consumption of some systems. As far as I can see wmfrog uses a polling mechanism because it has to interact with xlib and get the output of a perl script. I'd like to suggest the following alternatives: 1) Don't use system to invoke the perl script, but do it manualy using fork and execve. This way one can attach to the SIGCHLD signal not to poll ~/.wmapps. As the signal interrupts the process blocking xlib calls can be used. 2) Use select. The perl script could be rewritten to pass data to stdout and opened using popen. That way one can select on the perl fd and the xlib fd. Unfortunately I don't have the time to provide a patch at the moment. (And sorry to say this, but the code seems pretty low quality ...) Helmut -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.23.14 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages wmfrog depends on: ii libc6 2.7-18 GNU C Library: Shared libraries ii libx11-6 2:1.1.5-2 X11 client-side library ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar ii libxpm4 1:3.5.7-1 X11 pixmap library ii wget 1.11.4-2 retrieves files from the web wmfrog recommends no packages. wmfrog suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org