Trap Command Problem

Hi All ,

Could you please help me in resolving the below problem.

I have 2 Script file say

Scrip1.sh
Script2.sh.

Initially Script1.sh is started executed and inside the script1 , SIGINT is trapped to a separate cleanup process and exit.

While Script1.sh is started executing , CTRL+C is given from Keyboard and it is working fine.i.e Separate Claenup is executed and exit.

In the Script2.sh , the KILL -SIGINIT pid (Pid of Script1.sh ) command is invoked . during this case , Script1.sh is not killed , but it is in HANG State , taking its own time to finally get exit.

Even without invoking Script2.sh , from a separate Terminal , KILL command is issued , but the same behaviour.

Could someone of you help me.

Typo?

KILL -SIGINIT pid

should be:

kill -SIGINT pid