#1 adding signal handlers for TERM, HUP and QUIT