parameters: (inst)
docstring: Same as above, for routines relying on reading /proc fs.
docstring_summary: Same as above, for routines relying on reading /proc fs.
docstring_tokens: Same as above for routines relying on reading / proc fs .
function: def wrap_exceptions_procfs(inst):
      """Same as above, for routines relying on reading /proc fs."""
      try:
          yield
      except (ProcessLookupError, FileNotFoundError):
          # ENOENT (no such file or directory) gets raised on open().
          # ESRCH (no such process) can get raised on read() if
          # process is gone in meantime.
          if not pid_exists(inst.pid):
              raise NoSuchProcess(inst.pid, inst._name)
          else:
              raise ZombieProcess(inst.pid, inst._name, inst._ppid)
      except PermissionError:
          raise AccessDenied(inst.pid, inst._name)
function_tokens: def wrap_exceptions_procfs ( inst ) : try : yield except ( ProcessLookupError , FileNotFoundError ) : # ENOENT (no such file or directory) gets raised on open(). # ESRCH (no such process) can get raised on read() if # process is gone in meantime. if not pid_exists ( inst . pid ) : raise NoSuchProcess ( inst . pid , inst . _name ) else : raise ZombieProcess ( inst . pid , inst . _name , inst . _ppid ) except PermissionError : raise AccessDenied ( inst . pid , inst . _name )