In article <20101207232231.ga7...@sig21.net>, j...@sig21.net (Johannes Stezenbach) wrote:
> *From:* Johannes Stezenbach <j...@sig21.net> > *To:* busybox@busybox.net > *Date:* Wed, 8 Dec 2010 00:22:31 +0100 > > On Tue, Dec 07, 2010 at 11:43:53AM +0000, Bob Dunlop wrote: > > > Pid files are not very robust in general. > > > > You can make you kill script a bit more robust with a simple > > check. Get > > the pid from the file and examine "/proc/<pid>/cmdline" which > > should > > contain the name of the dhcp process as the first null terminated > > string. > > You can't use "/proc/<pid>/exe" for this because that will just be > > pointing at busybox. If the name matches you're on to a > > reasonable bet > > that you are killing the right thing. that's nice - I was grepping the ps line from field 5... but your approach is prettier :-) D _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox