[laptop-mode] lm-polling-daemon started over and over again
Matthijs Kooijman
matthijs at stdin.nl
Sun Jul 12 16:42:58 CEST 2009
--E2AOuUyqcJWq6+RR
Content-Type: multipart/mixed; boundary="SUygiN5FMnIY1JbD"
Content-Disposition: inline
--SUygiN5FMnIY1JbD
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi all,
while debugging another issue, I noticed that the check for running lm-poll=
ing
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:=20
-x Scripts too - this causes the program to also return process
id=E2=80=99s of shells running the named scripts.
When passing -x, laptop-mode stops spawning new on every restart (and proba=
bly
in other cases as well). It seems that the killall line used does work
properly.
See the attached (again trivial) patch.
Gr.
Matthijs
--SUygiN5FMnIY1JbD
Content-Disposition: attachment; filename="battery-polling.diff"
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
A non-text attachment was scrubbed...
Name: battery-polling.diff
Type: text/x-diff
Size: 499 bytes
Desc: not available
URL: <http://mailman.samwel.tk/pipermail/laptop-mode/attachments/20090712/d33b6a9e/attachment.diff>
--SUygiN5FMnIY1JbD--
--E2AOuUyqcJWq6+RR
Content-Description: Digital signature
Content-Disposition: inline
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.samwel.tk/pipermail/laptop-mode/attachments/20090712/d33b6a9e/attachment.pgp>
--E2AOuUyqcJWq6+RR--
More information about the laptop-mode
mailing list