#!/bin/bash
trap 'myfunc' 2
function myfunc(){
read -p 'do you want to terminate this thread ' s
case $s in
'yes')
exit;
;;
'no')
;;
'*')
myfunc
;;
esac
}
i=0
while:
do
i=$((i+1))
echo $i
done
trap 捕捉信号量的小程序
最新推荐文章于 2021-04-29 07:04:50 发布