[Toybox] Extension of killall with support for -i and -v

Elie De Brauwer eliedebrauwer at gmail.com
Sun Dec 16 04:46:13 PST 2012


Hello all,

I've extended killall to support the -v (verbose) and -i (interactive) 
option as described in 
http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/killall.html 
sample output:

Suppose 5 yes'es are running:

# Kill 3 of them
edb at lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -vi -9 yes
Signal yes(11452) ? (y/N):
Signal yes(11453) ? (y/N):N
Signal yes(11454) ? (y/N):y
Killed yes(11454) with signal 9
Signal yes(11455) ? (y/N):y
Killed yes(11455) with signal 9
Signal yes(11456) ? (y/N):y
Killed yes(11456) with signal 9
# Kill none of the remaining
edb at lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -vi -9 yes
Signal yes(11452) ? (y/N):
Signal yes(11453) ? (y/N):
killall: No such process
# Kill all remaining
edb at lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -vi -9 yes
Signal yes(11452) ? (y/N):y
Killed yes(11452) with signal 9
Signal yes(11453) ? (y/N):y
Killed yes(11453) with signal 9
# None left
edb at lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -vi -9 yes
killall: No such process

my 2 cents
E.


-- 
Elie De Brauwer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: killall_-v_-i_options.patch
Type: text/x-patch
Size: 3328 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20121216/3fcdf6a7/attachment-0006.bin>


More information about the Toybox mailing list