Comment 8 for bug 371525

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote : Re: [Bug 371525] Re: laptop-mode crashes taking up 100% CPU with IOWait when polling for battery level is enabled

On Wednesday 21 Oct 2009 15:00:46 Tormod Volden wrote:
> There is no -X option in the current pidof. Do you mean -x?
>

Hi Tormod,

Yes, it is the -x option.
This was fixed upstream already.

revno: 142
committer: Ritesh Raj Saarraf <email address hidden>
branch nick: LMT-Main
timestamp: Mon 2009-07-13 11:37:49 +0545
message:
  Run pidof with the -x Script Mode switch. Thanks Matthijs Kooijman

  while debugging another issue, I noticed that the check for running lm-
polling
  daemons is not working.
  /usr/share/laptop-mode-tools/modules/battery-level-polling uses
  "pidof lm-polling-daemon" to see if the daemon is already running, but this
  does not work. The actual process is /bin/sh, which is running the
  lm-polling-daemon script. To make this work properly, pidof supports a -x
  option:

         -x Scripts too - this causes the program to also return process
                id’s of shells running the named scripts.

  When passing -x, laptop-mode stops spawning new on every restart (and
probably
  in other cases as well). It seems that the killall line used does work
  properly.

Ritesh
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."