Commit 8da900e4 by Riccardo Vicedomini

fixed problem with trap

parent b2a5d472
...@@ -13,10 +13,8 @@ ...@@ -13,10 +13,8 @@
# with MetaCLADE2. If not, see <https://cecill.info/>. # with MetaCLADE2. If not, see <https://cecill.info/>.
# #
# Pressing CTRL-C will stop the whole execution of the script trap ctrl_c INT TERM ERR; function ctrl_c() { exit 5; }
trap ctrl_c INT; function ctrl_c() { exit 5; } trap 'kill 0' EXIT
# Exit from this script causes child processes (pending jobs) to stop execution
trap 'kill $(jobs -p)' EXIT
CMD_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd) CMD_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment