Killing jobs?

Wim Vinckier wimpunk at gmail.com
Fri Jun 1 08:36:48 UTC 2007


On 5/31/07, Alexander Krause <alexander.krause at erazor-zone.de> wrote:
> Hi,
>
> i recently tried to kill some background- jobs in a script like this:
>
> ----
> quit() {
>         kill %1
>         exit 0
> }
> ...
>
> trap 'quit' 1
> trap 'quit' 2
> trap 'quit' 3
> trap 'quit' 9
>
> ringcompare &
> ringdetect
> ----
>
> Geode ~ $ ./ringdetect.sh
> kill: invalid number '%1'
>
> Looks like kill does not support specifying jobs?
> Is there any other way to finish a script and automatically stop all it's
> jobs?
>
>
> Anyway thanks a lot for busybox :-)
>
> cheers Alex
> --
> Alexander Krause
> Amtmann-Kästner-Platz 11
> 99091 Erfurt
>
> Mail alexander.krause at erazor-zone.de
> Tel. +49 (179) 4725826
> Fax. +49 (361) 6008915
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>

Have you tried it on a normal system?  I was trying it on debian using
bash and it doesn't work either.  It works if you use `kill %1` from
the normal bash shell but it doesn't work the from a script like you
specified.

greetings,

wim.
-- 
You have been on the computer to long when you start tilting your head
sideways to smile :-)



More information about the busybox mailing list