def _register_signal_handler(self, signum):
        try:
            signal.signal(signum, self)
        except (__HOLE__, IllegalArgumentException), err:
            # ValueError occurs e.g. if Robot doesn't run on main thread.
            # IllegalArgumentException is http://bugs.jython.org/issue1729
            if currentThread().getName() == 'MainThread':
                self._warn_about_registeration_error(signum, err)
dataset/ETHPy150Open shellderp/sublime-robot-plugin/lib/robot/running/signalhandler.py/_StopSignalMonitor._register_signal_handler