You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# Abort the whole script from a function
|
|
#
|
|
trap "exit 1" TERM
|
|
export TOP_PID=$$
|
|
#
|
|
function fatal()
|
|
{
|
|
echo "Goodbye"
|
|
kill -s TERM $TOP_PID
|
|
}
|
|
#
|
|
echo "Function call will abort"
|
|
echo $(func)
|
|
echo "This will never be printed"
|