now catch signal terminate and signal interrupt