Reset signal handlers to their default handler, and install some
 special handlers for a few signals. The previous signal handlers
 will be put back by calling revert_signal_handlers.
181503
def reset_signal_handlers
      Signal.list_trappable.each_key do |signal|
        begin
          prev_handler = trap(signal, DEFAULT)
          if prev_handler != DEFAULT
            @previous_signal_handlers[signal] = prev_handler
          end
        rescue ArgumentError
          # Signal cannot be trapped; ignore it.
        end
      end
      trap('HUP', IGNORE)
      PhusionPassenger.call_event(:after_installing_signal_handlers)
    end
952426
def ResetHandler(self, name):
        '''
        
        '''
        if name in self.tags:
            if len(self.tags) > 1:
                key = len(self.tags) - 2
                self.handler = None
                while key >= 0:
                    if self.tags[key] in self.structure:
                        self.handler = self.structure[self.tags[key]]
                        break
                    key -= 1

            else:
                self.handler = None
799331
def enable_sig_handler(signal_name, handler):
    '''
    
    '''
    if hasattr(signal, signal_name):
        signal.signal(getattr(signal, signal_name), handler)
417390
def _setup_signal_handler(self):
        
        signal.signal(signal.SIGTERM, self._signal_handler)
        signal.signal(signal.SIGINT, self._signal_handler)
        signal.signal(signal.SIGQUIT, self._signal_handler)
1201371
private void reset() {
		// Reset codecs
		resetFormats();
		
		// Reset channels
		if (this.rtcpMux) {
			this.rtcpMux = false;
		}

		// Reset ICE
		if (this.ice) {
			disableICE();
		}

		// Reset WebRTC
		if (this.dtls) {
			disableDTLS();
		}
		
		// Reset statistics
		this.statistics.reset();
		this.cname = "";
		this.ssrc = 0L;
	}
1033818
public void reset() {

        this.pp.setIndex(0);
        this.pp.setErrorIndex(-1);
        this.errorMessage = "";
        this.warning = false;
        this.rawValues = null;

    }
408182
def forward_signals_to(pid, signals = %w[INT])
        # Set up signal handlers
        logger.debug "Setting up signal handlers for #{signals.inspect}"
        signal_count = 0
        signals.each do |signal|
          Signal.trap(signal) do
            Process.kill signal, pid rescue nil

            # If this is the second time we've received and forwarded
            # on the signal, make sure next time we just give up.
            reset_handlers_for signals if ++signal_count >= 2
          end
        end

        # Run the block now that the signals are being forwarded
        yield
      ensure
        # Always good to make sure we clean up after ourselves
        reset_handlers_for signals
      end
461343
def setup_signals():
	
	signal.signal(signal.SIGINT, shutit_util.ctrl_c_signal_handler)
	signal.signal(signal.SIGQUIT, shutit_util.ctrl_quit_signal_handler)
91897
public function reset()
    {
        $this->values[self::PROTOCOL_VERSION] = null;
        $this->values[self::SOURCE_ID] = null;
        $this->values[self::DESTINATION_ID] = null;
        $this->values[self::NNAMESPACE] = null;
        $this->values[self::PAYLOAD_TYPE] = null;
        $this->values[self::PAYLOAD_UTF8] = null;
        $this->values[self::PAYLOAD_BINARY] = null;
    }
186652
def reset(self):
        
        self.__mem.reset()
        self.__cpu.reset()
        self.__tainter.reset()

        # Instructions pre and post handlers.
        self.__instr_handler_pre = None, None
        self.__instr_handler_post = None, None

        self.__set_default_handlers()
1231264
def add_result_handler(self, handler):
        
        self._result_handlers.append(handler)
        # Reset sorted handlers
        if self._sorted_handlers:
            self._sorted_handlers = None
1130080
protected function cleanup_error_handler()
    {
        restore_error_handler();

        if ($this->last_error !== null) {
            throw new \ErrorException(
                $this->last_error['errstr'],
                0,
                $this->last_error['errno'],
                $this->last_error['errfile'],
                $this->last_error['errline']
            );
        }
    }
820326
def restore(self):
        """"""
        signal.signal(signal.SIGINT, self.original_sigint)
        signal.signal(signal.SIGTERM, self.original_sigterm)
        if os.name == 'nt':
            signal.signal(signal.SIGBREAK, self.original_sigbreak)
786887
public void reset() {
        numberOfErrors = 0;
        numberOfFatalErrors = 0;
        numberOfWarnings = 0;
        errors.clear();
        fatalErrors.clear();
        warnings.clear();
    }
668908
def stop(self):
        

        if self.original_handler is not None:
            signal.signal(signal.SIGWINCH, self.original_handler)
594484
def reset(self):
        
        if self._retrigger_value is not NONE:
            self.notify(self._retrigger_value)
            self._state = self._retrigger_value
            self._next_state = self._retrigger_value
        if self._call_later_handler:
            self._call_later_handler.cancel()
            self._call_later_handler = None
23347
def _reset_sig_handler(self):
        """"""

        signal.signal(signal.SIGINT, self.old_sigint)
        signal.signal(signal.SIGTERM, self.old_sigterm)
        try:
            signal.signal(signal.SIGHUP, self.old_sighup)
        except AttributeError:
            pass