On Fri, Feb 03, 2006 at 01:57:34AM +0100, Michael Biebl wrote: > I found the bug that made kpowersave fail to properly autosuspend. > It's the path to the pidof binary, which is set to /sbin/pidof. But in > Debian and Gentoo it is /bin/pidof. So checkBlacklisted fails and > kpowersave does not generate a suspend event. > You can apply the patch which sets the correct path for Gentoo. > > @Danny: Do you think it would be safe to assume /bin/pidof or should we > create a configure check?
I think /bin/pidof is fine, it will also work on suse since there it is a symlink to /sbin/pidof. If we find a distro where it is not available in /bin, we can still think about a configure-check :-) Additionally, the handling could be improved: we could at least throw an error on stderr if a needed program is not found. > Index: src/autosuspend.cpp > =================================================================== > --- src/autosuspend.cpp (Revision 311) > +++ src/autosuspend.cpp (Arbeitskopie) > @@ -165,7 +165,7 @@ > delete proc; > > proc = new KProcess; > - *proc << "/sbin/pidof" << blacklist; > + *proc << "/bin/pidof" << blacklist; > > connect( proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this, > SLOT(getPIDs(KProcess *, char *, int))); I'll leave it to Danny to apply this, but it looks fine to me. -- Stefan Seyfried \ "I didn't want to write for pay. I QA / R&D Team Mobile Devices \ wanted to be paid for what I write." SUSE LINUX Products GmbH, Nürnberg \ -- Leonard Cohen _______________________________________________ powersave-devel mailing list [email protected] http://forge.novell.com/mailman/listinfo/powersave-devel
