Trapping the script

Using these signals:
```
SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM SIGTSTP
```

Fixed #272
This commit is contained in:
Søren Theilgaard
2022-02-08 13:11:08 +01:00
parent aea7d282fe
commit b42bd7e408
4 changed files with 21 additions and 3 deletions

View File

@@ -1,4 +1,9 @@
# MARK: check minimal macOS requirement
# MARK: 3 Arguments
# Start trapping the script
trap_with_arg func_trap SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM SIGTSTP
# check minimal macOS requirement
autoload is-at-least
installedOSversion=$(sw_vers -productVersion)
@@ -125,4 +130,4 @@ valuesfromarguments)
fi
;;
# label descriptions start here
# Mark: label descriptions start here