code: def _kill_process0(self, pid, sig=signal.SIGKILL):
          
          if self._user is None:
              super(RunExecutor, self)._kill_process(pid, sig)
          else:
              logging.debug('Sending signal %s to %s with sudo.', sig, pid)
              try:
                  # Cast sig to int, under Python 3.5 the signal.SIG* constants are nums, not ints.
                  subprocess.check_call(args=self._build_cmdline(['kill', '-'+str(int(sig)), str(pid)]))
              except subprocess.CalledProcessError as e:
                  # may happen for example if process no longer exists
                  logging.debug(e)
docs: Send signal to given process, either directly or with sudo.
          If the target is the sudo process itself, the signal will be lost,
          because we do not have the rights to send signals to sudo.
          Use _kill_process() because of this.