From: Phil Blundell <pb@pbcl.net>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Subject: Re: [RFC][PATCH] sysvinit: make pidof usuable in a standalone setting
Date: Tue, 31 May 2011 10:27:22 +0100 [thread overview]
Message-ID: <1306834042.2525.477.camel@phil-desktop> (raw)
In-Reply-To: <1306581686-17625-1-git-send-email-koen@dominion.thruhere.net>
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.
prev parent reply other threads:[~2011-05-31 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 11:21 [RFC][PATCH] sysvinit: make pidof usuable in a standalone setting Koen Kooi
2011-05-30 11:45 ` Koen Kooi
2011-05-31 8:27 ` Koen Kooi
2011-05-31 8:59 ` Richard Purdie
2011-05-31 9:27 ` Phil Blundell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306834042.2525.477.camel@phil-desktop \
--to=pb@pbcl.net \
--cc=koen@dominion.thruhere.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.