(I changed the point of question into about more basic symptom.) I created child and grand child in bash script.(in Ubuntu 14.04)
#! /bin/bash
{
sleep 21 &
sleep 22
}&
sleep 23
But 2 kind of command to kill process group shows different result. ( I've run the kill command in another terminal at this test.)
kill -INT -<pgid> # -> grand child(sleep 21) survives.
kill -TERM -<pgid> # -> kills all correctly.
Could you explain what it is going on internally?