Hi,
~/linux/test/bash/man/builtin/trap/SIGTERM$ cat main.sh
#!/usr/bin/env bash
echo $$
trap "echo Booh!; exit" SIGTERM
while true
do
sleep 60
done
I have the above script. I run it and get the process id. Then I use
"kill -SIGTERM pid" to kill it. But the script fails to respond. Does
anybody know how to get the script respond to SIGTERM? Thanks.
--
Regards,
Peng