On Sat, 2011-05-28 at 13:21 +0200, Koen Kooi wrote:
> The alternative is to just move 'killall5' into the pidof subpackage and to 
> RDPEPENDS_${PN} += "${PN}-pidof"

I think I like that better.  Duplicating the binary doesn't sound very
desirable.

For what it's worth, also note that:

- busybox provides an implementation of pidof too, which might be worth
considering if you aren't otherwise using sysvinit; and

- it would be fairly trivial to implement pidof as a standalone shell
script.  As a starting point, something like:

#!/bin/sh
p="($1)"
cd /proc
out=
for i in [0123456789]*/stat; do
  read a b c < $i
  if [ $p = $b ]; then
    out="`dirname $i` $out"
  fi
done
echo $out

gives you the basic behaviour of "pidof <name>".

p.



_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to