~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-26 23:00:55 UTC
  • mfrom: (5830.3.10 i18n-msgfmt)
  • Revision ID: pqm@pqm.ubuntu.com-20110526230055-llm6blihy5oflj2b
(vila) Generates en.mo file. (INADA Naoki)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2448
2448
            if os.access(f, os.X_OK):
2449
2449
                return f
2450
2450
    return None
2451
 
 
2452
 
 
2453
 
def _posix_is_local_pid_dead(pid):
2454
 
    """True if pid doesn't correspond to live process on this machine"""
2455
 
    try:
2456
 
        # Special meaning of unix kill: just check if it's there.
2457
 
        os.kill(pid, 0)
2458
 
    except OSError, e:
2459
 
        if e.errno == errno.ESRCH:
2460
 
            # On this machine, and really not found: as sure as we can be
2461
 
            # that it's dead.
2462
 
            return True
2463
 
        elif e.errno == errno.EPERM:
2464
 
            # exists, though not ours
2465
 
            return False
2466
 
        else:
2467
 
            raise
2468
 
    else:
2469
 
        # Exists and our process: not dead.
2470
 
        return False
2471