diff --git a/debian/changelog b/debian/changelog index 58c1222..fe39e70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +g15daemon (1.9.0-wip.20070910-2) unstable; urgency=low + + * pause() instead of busy loop. + + -- Giacomo Catenazzi Tue, 11 Sep 2007 06:12:01 +0200 + g15daemon (1.9.0-wip.20070910-1) unstable; urgency=low * New upstream release (from svn) diff --git a/debian/rules b/debian/rules index 09005e6..e735f9b 100755 --- a/debian/rules +++ b/debian/rules @@ -3,12 +3,14 @@ DEB_MAKE_CLEAN_TARGET = distclean clean:: - -rm config/* configure config.log config.status Makefile.in */Makefile.in aclocal.m4 config.h.in Makefile + -rm -Rf plugins/.libs/ libg15daemon_client/.libs/ g15daemon/.libs/ + -rm -f */*.o */*.la */*.lo g15daemon/g15daemontest g15daemon/g15daemon stamp-h1 + -rm -f config/* configure config.log config.status Makefile.in */Makefile.in aclocal.m4 config.h.in Makefile */Makefile libtool config.h -pre-build:: +makebuilddir/g15daemon:: [ -d config ] || mkdir config aclocal -I config - libtoolize --force --copy + libtoolize --automake --force --copy autoheader automake --add-missing --copy autoconf diff --git a/g15daemon/g15_plugins.c b/g15daemon/g15_plugins.c index d32cddc..05d34f5 100644 --- a/g15daemon/g15_plugins.c +++ b/g15daemon/g15_plugins.c @@ -46,7 +46,7 @@ #include -extern int leaving; +extern volatile int leaving; void * g15daemon_dlopen_plugin(char *name,unsigned int library) { diff --git a/g15daemon/main.c b/g15daemon/main.c index 406ef7f..8374288 100644 --- a/g15daemon/main.c +++ b/g15daemon/main.c @@ -49,7 +49,7 @@ #endif /* all threads will exit if leaving >0 */ -int leaving = 0; +volatile int leaving = 0; int keyboard_backlight_off_onexit = 0; unsigned int g15daemon_debug = 0; unsigned int cycle_key; @@ -464,7 +464,7 @@ int main (int argc, char *argv[]) sigaction(SIGUSR1, &new_action, NULL); do { - sleep(1); + pause(); } while( leaving == 0);