killall behaviour
Alfonso Ranieri
alforan at tin.it
Fri Aug 29 16:02:46 UTC 2014
Il 29/08/2014 17:39, Harald Becker ha scritto:
> Hi Alfonso !
>
> > > See what ps or top say for those two jobs.
>
> You did not give the information from my question.
>
>> busybox killall foobar
>
> My Busybox killed foobar, not hello ... just tested!
>
> So you indeed need to look for more detail, what is listed for the two
> active processes.
>
> --
> Harald
>
>
>
funtoo box amd64: BusyBox v1.21.1 (2014-05-09 11:02:02 CEST)
router mips uClibc: BusyBox v1.23.0.git (2014-08-20 11:24:12 CEST)
foobar.c
#include <stdio.h>
int main(int argc,char **argv)
{
pause();
return 0;
}
gcc -o foobar foobar.c
ls -s foobar hello
./foobar &
./hello &
busybox ps | grep [f]oobar
19446 root 0:00 ./foobar
busybox ps | grep [h]ello
19447 root 0:00 ./hello
killall foobar
busybox ps | grep [f]oobar
(nothing)
busybox ps | grep [h]ello
19447 root 0:00 ./hello
./foobar &
busybox ps | grep [f]oobar
19474 root 0:00 ./foobar
busybox killall foobar
[5]- Terminato ./hello
[6]+ Terminato ./foobar
(Terminati is killed)
busybox ps | grep [f]oobar
(nothing)
busybox ps | grep [h]ello
(nothing)
The exact sane thing happens on the router.
More information about the busybox
mailing list