I am trying to develop a script that will properly handle kill signals particularly kill -2. I have program (_progres) that properly receives the signal if I run it from the command line directly:
_progres -T /tmp -p /home/mejones/signal.p -b 2>&1 &
If I try to put it in a script (i.e. start_signal.sh) that contains:
#!/bin/bash
echo "starting signal.p...."
exec $DLC/bin/_progres -T /tmp -p /home/mejones/signal.p -b 2>&1 &
the kill -2 does NOT get received by _progres and I can only kill the script with kill -15.
I have tried start_signal.sh with both sh and bash.
Does anyone have any suggestions on why the script signal behaviour is different then when called from the command line? I am assuming that the issue would be with the script insulating the signals from getting to _progres, but I may be wrong.
Thanks in Advance for you responses.