function after_ctrl_c() {
echo
# shellcheck disable=SC2162
read -p "do you want to stop the program? [yes/no]: " answer
case $answer in
y | yes | Y | YES)
echo Yes
exit
;;
*)
echo No
;;
esac
}
trap after_ctrl_c SIGINT
echo $$
while sleep 10
do
echo Sleeping
done