[BusyBox] Problem with pidof
S.Raimbault
raimbault.sebastien at free.fr
Fri Nov 26 17:33:56 UTC 2004
Hi,
I have a problem with the implementation of 'pidof' in busybox 1.00-rc3.
It uses the 'stat' entries in proc filesystem to get the names of
processes. Unfortunately, when processes are launched from a script,
the script process has the name of the launched process in procfs stat
entry:
>ps
373 root 316 S /bin/sh /etc/rc.d/init.d/httpd start
...
>cat /proc/373/stat
373 (httpd) S ....
This will make pidof httpd returning 373. This is worrying, as the
script uses pidof in order to detect any running httpd. Of course, an
easy workaround would be to rename the script, but I believe this works
with standard pidof.
Wouldn't it be better using cmdline entry instead of stat ?
Thanks for your opinion,
SeB.
More information about the busybox
mailing list