We encountered an issue in our project while using the Interix UNIX (SFU 3.5) and explained our query below. We would be happy if anybody helps us to troubleshoot the problem J
In our code the trapping signal for all signals like HUP, INT, QUIT, ILL, TRAP, ABRT, EXCEPT, etc., is initialized in the main script. This main script calls the various executable codes and shell scripts which are mostly used to connect the ACR data base and transfer the files from local machine to remote machine.
While execution of our code sometimes we received message like Trapped Signal HUP and sometimes it was executing fine. Could any of you please explain us, why we have received message Trapped Signal HUP in some occurrences and not in some other times for the same executables?
For example,
trap_function()
{
SIGNAL=$1
echo Trapped signal $SIGNAL >> $HOME/Trap.log
trap - $SIGNAL
kill -$SIGNAL $MYPID
}
for SIGNAME in \
HUP \
INT \
;;;;
XCPU \
XFSZ
do
trap "trap_function $SIGNAME" $SIGNAME
done
MYPID=$$
./script1.sh &
./script2.sg &
./script3.sh &
........
......
./exe1 &
.....
./script30.sh &
./exe5 &
Note:All log files which sizes are greater than 200kb will be taken backup.