Did I find the right examples for you? yes no

All Samples(30)  |  Call(28)  |  Derive(0)  |  Import(2)
Return True if given PID exists in the current process list.
This is faster than doing "pid in psutil.get_pid_list()" and
should be preferred.

        def pid_exists(pid):
    """Return True if given PID exists in the current process list.
    This is faster than doing "pid in psutil.get_pid_list()" and
    should be preferred.
    """
    return _psplatform.pid_exists(pid)
        


src/k/t/ktbs-HEAD/examples/browser-history/firefox/processinfo.py   ktbs(Download)
 
        # On vérifie que le PID existe
        if not psutil.pid_exists(pid):
            print "Le processus '%s' n'existe pas" % pid
            return
        while process_loop == True:
            # On vérifie que le processus existe toujours
            if not psutil.pid_exists(self.pid):
                print "Le processus '%s' n'existe plus : on arrête sa " \
                      "surveillance" % self.pid

src/c/l/cloudooo.handler.ooo-0.2/src/cloudooo/handler/ooo/application/application.py   cloudooo.handler.ooo(Download)
from cloudooo.utils.utils import logger
from cloudooo.handler.ooo.utils.utils import waitStopDaemon
from psutil import pid_exists, Process, AccessDenied
 
 
        waitStopDaemon(self, self.timeout)
      finally:
        if pid_exists(process_pid) or self.status():
          Process(process_pid).kill()
      delattr(self, "process")
  def status(self):
    """Check by socket if the openoffice work."""
    pid = self.pid()
    if pid is None or not pid_exists(pid):
      return False

src/d/o/domogik-HEAD/src/domogik/common/processinfo.py   domogik(Download)
        self.myxpl = myxpl
        # check pid exists
        if not psutil.pid_exists(pid):
            self.log.warning(u"No process '%s' exists" % pid)
            return
        """
        # check process status
        if not psutil.pid_exists(self.pid):
            self.log.warning(u"Process '%s' doesn't exists anymore : stop watching for it" % self.pid)
            self.stop.set()

src/d/r/droned-HEAD/droned/lib/kitt/proc/psutil_backend.py   droned(Download)
def isRunning(pid):
    """is a given process id running, returns Boolean"""
    if HAS_PROC_DIR: #yet another optimization
        return os.path.exists(os.path.join(PROC_DIR,str(pid)))
    try: return psutil.pid_exists(int(pid))

src/l/a/launch.py-HEAD/system/process_helper.py   launch.py(Download)
        sys.stdout.write('killing: %s { \n' % process_name)
        pid = get_process_pid(process_name)
        if pid is not None and psutil.pid_exists(int(pid)):
            p = psutil.Process(pid)
            p.kill()

src/s/p/Spruce-ldap-0.1.3/spruce/ldap/_services.py   Spruce-ldap(Download)
    def _probe_status(self):
        if self._status == 'running':
            gone = False
            if _ps.pid_exists(self.pid):
                if _ps.Process(self.pid).status == _ps.STATUS_ZOMBIE:

src/b/e/Bedframe-0.13.5/bedframe/_services.py   Bedframe(Download)
    def _probe_status(self):
        if self._status == 'running':
            gone = False
            if _ps.pid_exists(self.pid):
                if _ps.Process(self.pid).status == _ps.STATUS_ZOMBIE:

src/c/l/cloudooo.handler.ooo-0.2/src/cloudooo/handler/ooo/handler.py   cloudooo.handler.ooo(Download)
from cloudooo.handler.ooo.monitor import monitor_sleeping_time
from cloudooo.utils.utils import logger
from psutil import pid_exists
 
 
    finally:
      self._stopTimeout()
      if pid_exists(process.pid):
        process.terminate()
    return stdout, stderr

src/s/a/salt-HEAD/salt/utils/process.py   salt(Download)
    '''
    if HAS_PSUTIL:
        return psutil.pid_exists(pid)
    else:
        try:

src/s/a/salt-thin-HEAD/salt/utils/process.py   salt-thin(Download)
    '''
    if HAS_PSUTIL:
        return psutil.pid_exists(pid)
    else:
        try:

  1 | 2 | 3  Next