Added signal handlers, closing socket on forceful termination
added global socket descriptor