<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _reg_sighandlers(self):
 """ Registers signal handlers to this class. """


        # SIGCHLD, so we shutdown when any of the child processes exit
        _handler = lambda signo, frame: self.shutdown()
        signal.signal(signal.SIGCHLD, _handler)
        signal.signal(signal.SIGTERM, _handler)