[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] Problem with pidof
From:       "S.Raimbault" <raimbault.sebastien () free ! fr>
Date:       2004-11-26 17:33:56
Message-ID: 41A76904.1050303 () free ! fr
[Download RAW message or body]

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.
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic