#/bin/bash
#trace ctrl+c for kill a process
#trap handles seperately before terminating the process
function trap_handler()
{
echo "trap_handler called $$ $@"
rm -f /tmp/input0.$$
exit 1
}
trap trap_handler 2
echo "provide emp name"
read name
#trace ctrl+c for kill a process
#trap handles seperately before terminating the process
function trap_handler()
{
echo "trap_handler called $$ $@"
rm -f /tmp/input0.$$
exit 1
}
trap trap_handler 2
echo "provide emp name"
read name
No comments:
Post a Comment