Handle the signal sent to the process
        :param sig:  Signal set to the process
        :param _: Frame is not being used

def sig_handler(self, sig, _):
        """ Handle the signal sent to the process
        :param sig:  Signal set to the process
        :param _: Frame is not being used
        """
        import tornado.ioloop
        from tornado.process import task_id
        tid = task_id()
        pid = os.getpid()
        if tid is None:
            logger.warning("main process (pid %s) caught signal: %s" %
                           (pid, sig))
        else:
            logger.warning("child %s (pid %s) caught signal: %s" %
                           (tid, pid, sig))
        tornado.ioloop.IOLoop.current().add_callback(self.shutdown)