From 0f8c9a556b07ff7ea9adbed0542491d514ce5e40 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 13 Apr 2016 15:50:55 +0200 Subject: [PATCH] fix for reliably killing the softIoc when the iocsh gets killed --- iocsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iocsh b/iocsh index 927fb65..c577b56 100755 --- a/iocsh +++ b/iocsh @@ -304,7 +304,10 @@ done } startup=/tmp/iocsh.startup.$$ -trap "stty sane; echo; rm -f $startup" EXIT TERM KILL + +# clean up and kill the softIoc when killed by any signal +trap "kill -s SIGTERM 0; stty sane; echo; rm -f $startup; " EXIT + { echo "# date=\"$(date)\"" echo "# user=\"${USER:-$(whoami)}\""