标签:
[root@localhost ~]$ cat singlehandle.sh | sed ‘/^$/d‘
#!/bin/bash
function handler()
{
echo Hey, received signal : SIGINT
}
echo My Process ID is $$
trap ‘handler‘ SIGINT
while true;
do
sleep 1
done
标签:
原文地址:http://www.cnblogs.com/poptest/p/5026737.html