/*
Return true if the container is running otherwise false.
335287
function(cid) {
    // Validate input.
    return Promise.try(function() {
      if (typeof cid !== 'string') {
        throw new VError('Invalid cid: ' + pp(cid));
      }
    })
    // Inspect.
    .then(function() {
      return inspect(cid);
    })
    .then(function(data) {
      return _.get(data, 'State.Running', false);
    })
    // If the container no longer exists, return false since it isn't running.
    // This will prevent a race condition from happening.
    // Wrap errors.
    .catch(function(err) {
      var expected = format('The container "\'%s\'" does not exist!', cid);
      if (_.endsWith(err.message, expected)) {
        return false;
      } else {
        // Wrap errors.
        throw new VError(err, 'Error querying isRunning: "%s".', pp(cid));
      }
    });
  }
547085
def is_containerized() -> bool:
    '''
    
    '''
    try:
        cginfo = Path('/proc/self/cgroup').read_text()
        if '/docker/' in cginfo or '/lxc/' in cginfo:
            return True
    except IOError:
        return False
1330135
function () {
            var self = this;
            for (var i = 0; i < self.length; i++) {
                if (Anim.isRunning(self[i])) {
                    return true;
                }
            }
            return false;
        }
381722
function isWithin(container, sel) {
	sel = sel || getSelection();
	return container.contains(sel.anchorNode) && container.contains(sel.focusNode);
}
1286428
public function isRunning() : bool
    {
        $result = shell_exec(
            sprintf(
                "ps -p %d --no-headers | grep -v '<defunct>'",
                $this->getProcessID()
            )
        );

        $result = trim($result, "\n");

        return ($result !== "");
    }
339979
def is_running(self):
        
        for node in self._nodes.values():
            # Some node type are always running we ignore them
            if node.status != "stopped" and not node.is_always_running():
                return True
        return False
977756
def isRunning(self, serviceJobNode):
        
        return (not self.jobStore.fileExists(serviceJobNode.startJobStoreID)) and self.isActive(serviceJobNode)
1295385
@NullSafe
  public static boolean isRunning(Process process) {
    try {
      return (process != null && process.exitValue() == Double.NaN);
    }
    catch (IllegalThreadStateException ignore) {
      return true;
    }
  }
91881
def is_running?
      return false if state != "exporting"
      begin
        Process.getpgid(exporter_pid)
        raise Exceptions::ExportIgnored.new("Ignored")
      rescue Errno::ESRCH
        return false
      end
    end
459434
def is_running(self):
        
        return self._state in [self.STATE_ACTIVE,
                               self.STATE_IDLE,
                               self.STATE_INITIALIZING]
105308
def is_running(self):
        
        return self._process.state() in [self._process.Running, self._process.Starting]
450411
public static function is_running() {
		if (!file_exists(Config::$pid_file)) {
			return false;
		}

		$pid = file_get_contents(Config::$pid_file);
		if (posix_getpgid($pid) === false) {
			unlink(Config::$pid_file);
			return false;
		}

		return true;
	}
649861
@Override
    public boolean isRunning() {
        for (Node node : mNodes) {
            if (node.animation.isRunning()) {
                return true;
            }
        }
        return false;
    }
740115
private boolean matchesCurrentEditLevel(I_CmsDropContainer container) {

        boolean result = !(container instanceof CmsContainerPageContainer)
            || (m_currentEditLevel == -1)
            || (m_currentEditLevel == ((CmsContainerPageContainer)container).getContainerLevel());
        return result;
    }
1266676
def check_server_running(pid):
    
    if pid == os.getpid():
        # special case--we're in Docker or some other kind of container
        # (or we got really unlucky and got the same PID twice).
        # this PID does not correspond to another running server, either way.
        return False

    try:
        os.kill(pid, 0)
        return True
    except OSError as oe:
        if oe.errno == errno.ESRCH:
            return False
        else:
            raise
1221854
public function isRunning()
    {
        if ($this->process === null) {
            return false;
        }

        $status = $this->getFreshStatus();

        return $status !== null ? $status['running'] : false;
    }
425212
@Override
  public boolean isFlowRunning(final int projectId, final String flowId) {
    boolean isRunning = false;
    isRunning =
        isRunning
            || isFlowRunningHelper(projectId, flowId, this.queuedFlows.getAllEntries());
    isRunning =
        isRunning
            || isFlowRunningHelper(projectId, flowId, this.runningExecutions.get().values());
    return isRunning;
  }