Stop child script by stoping parent script

Hi everyone,

I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that
parent_script

for a in 1 2 3 4 5 
do 
exec test -n $a
done 

What I want to do is when parent_script is killed, all instances of test script to be killed as well. Does anyone have any ideas for that?

Thanks in advance