code: def _signal(self, sig, pid=None):
          
          log = self._params.get('log', self._discard)
          if pid is None:
              pids = self.get_pids()
          else:
              pids = [pid]
          for pid in pids:
              try:
                  os.kill(pid, sig)
                  log.debug("Signalled '%s' pid %d with %s", self._name, pid, utils.signame(sig))
              except Exception as e:
                  log.warning("Failed to signal '%s' pid %d with %s -- %s", self._name, pid, utils.signame(sig), e)
docs: Send a signal to one or all pids associated with this task.  Never fails, but logs
          signalling faults as warnings.