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)}\""