Checks if the QEMU process is running

        :returns: True or False
505147
def is_running(self):
        

        if self._process:
            if self._process.returncode is None:
                return True
            else:
                self._process = None
        return False
514677
def verify_appium_is_running(self):
        """"""
        process = Popen(['ps -e | grep "Appium"'], shell=True, stdout=PIPE)
        (grep_output, _grep_error) = process.communicate()
        lines = grep_output.split('\n')
        for line in lines:
            if 'Appium.app' in line:
                self.stdout.write('Appium is already running')
                return True
        self.stdout.write('Please launch and configure Appium first')
        return False
1126520
public function isRunning()
    {
        if ($this->process === null) {
            return false;
        }

        $status = proc_get_status($this->process);
        if ($status && $status['running'] === false && $this->exitcode === null) {
            $this->exitcode = $status['exitcode'];
            // Note that you can not use proc_get_status to determine the PID because proc_open first launches a shell (sh)
            // whose PID is returned!
        }

        return $status && $status['running'];
    }
734306
def is_dead(self, proc, name):
        
        LOGGER.debug('Checking %s (%r)', name, proc)
        try:
            status = proc.status()
        except psutil.NoSuchProcess:
            LOGGER.debug('NoSuchProcess: %s (%r)', name, proc)
            return True

        LOGGER.debug('Process %s (%s) status: %r (Unresponsive Count: %s)',
                     name, proc.pid, status, self.unresponsive[name])
        if status in _PROCESS_RUNNING:
            return False
        elif status == psutil.STATUS_ZOMBIE:
            try:
                proc.wait(0.1)
            except psutil.TimeoutExpired:
                pass
            try:
                proc.terminate()
                status = proc.status()
            except psutil.NoSuchProcess:
                LOGGER.debug('NoSuchProcess: %s (%r)', name, proc)
                return True
        return status in _PROCESS_STOPPED_OR_DEAD
1261254
def isprocess(pid, error=False):
    
    try:
        # Don't worry folks, no processes are harmed in the making of
        # this system call:
        os.kill(pid, 0)
        return True
    except OSError:
        return False
281392
def is_filtered(self, process):
        
        if self.filter is None:
            # No filter => Not filtered
            return False

        if self.filter_key is None:
            # Apply filter on command line and process name
            return self._is_process_filtered(process, key='name') or \
                self._is_process_filtered(process, key='cmdline')
        else:
            # Apply filter on <key>
            return self._is_process_filtered(process)
1276272
def _sysv_is_enabled(name, runlevel=None):
    '''
    
    '''
    # Try chkconfig first.
    result = _chkconfig_is_enabled(name, runlevel)
    if result:
        return True

    if runlevel is None:
        runlevel = _runlevel()
    return (
        len(glob.glob('/etc/rc.d/rc{0}.d/S??{1}'.format(runlevel, name))) > 0)
654803
protected function is_process_running() {
	    $lockData = get_option($this->identifier . '_process_lock', null);

	    if (!empty($lockData) || isset($lockData['expires'])) {
            if (time() <= $lockData['expires']) {
                Logger::info('Lock still active.  Expires in: '.($lockData['expires'] - time()));

                return true;
            } else {
                Logger::info("Lock expired");
            }
        }

        if (!empty($lockData)) {
            delete_option($this->identifier . '_process_lock');
        } else {
            Logger::info('No lock data.');
        }

        return false;
	}
55140
def is_running(config, container, *args, **kwargs):
    '''
    
    '''
    try:
        infos = _get_container_infos(config, container)
        return (infos if infos.get('State', {}).get('Running') else None)
    except Exception:
        return None
252139
private function isRunning()
    {
        if (!is_resource($this->process)) {
            return false;
        }

        $status = proc_get_status($this->process);

        return $status['running'];
    }
538525
def is_running(self, is_stopped):
        '''  '''
        if is_stopped and self.is_stopped():
            return False

        return faspmanager2.isRunning(self.get_transfer_id())
1145156
def valid_lock(self):
        

        lock_pid = self.get_lock_pid()

        # If we're unable to get lock_pid
        if lock_pid is None:
            return False

        # this is our process
        if self._pid == lock_pid:
            return True

        # it is/was another process
        # see if it is running
        try:
            os.kill(lock_pid, 0)
        except OSError:
            self.release()
            return False

        # it is running
        return True
152934
def _termination_callback(self, returncode):
        

        if self.started:
            log.info("QEMU process has stopped, return code: %d", returncode)
            yield from self.stop()
            # A return code of 1 seem fine on Windows
            if returncode != 0 and (returncode != 1 or not sys.platform.startswith("win")):
                self.project.emit("log.error", {"message": "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
8205
def resume(self):
        

        vm_status = yield from self._get_vm_status()
        if vm_status is None:
            raise QemuError("Resuming a QEMU VM is not supported")
        elif vm_status == "paused":
            yield from self._control_vm("cont")
            log.debug("QEMU VM has been resumed")
        else:
            log.info("QEMU VM is not paused to be resumed, current status is {}".format(vm_status))
329909
def _is_pid_running_on_windows(pid):
    
    import ctypes.wintypes

    kernel32 = ctypes.windll.kernel32
    handle = kernel32.OpenProcess(1, 0, pid)
    if handle == 0:
        return False
    exit_code = ctypes.wintypes.DWORD()
    ret = kernel32.GetExitCodeProcess(handle, ctypes.byref(exit_code))
    is_alive = (ret == 0 or exit_code.value == _STILL_ALIVE)  # pylint: disable=undefined-variable
    kernel32.CloseHandle(handle)
    return is_alive
1006379
def is_active(self):
        
        self.open()
        active = lvm_lv_is_active(self.__lvh)
        self.close()
        return bool(active)
899432
def running?
      begin
        pid && Process.kill(0, pid)
      rescue Errno::ESRCH
        delete_pid
        false
      rescue Errno::EPERM
        true
      end
    end