def nice_set(self, value): if self.pid in (2, 3): # Special case PIDs: internally setpriority(3) return ESRCH # (no such process), no matter what. # The process actually exists though, as it has a name, # creation time, etc. raise AccessDenied(self.pid, self._name) return _psutil_posix.setpriority(self.pid, value)
def set_process_nice(self, value): if self.pid in (2, 3): # Special case PIDs: internally setpriority(3) return ESRCH # (no such process), no matter what. # The process actually exists though, as it has a name, # creation time, etc. raise AccessDenied(self.pid, self._process_name) return _psutil_posix.setpriority(self.pid, value)
def set_process_nice(self, value): return _psutil_posix.setpriority(self.pid, value)
def nice_set(self, value): return _psutil_posix.setpriority(self.pid, value)