summaryrefslogtreecommitdiff
path: root/docs/index.rst
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2015-07-09 11:43:48 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2015-07-09 11:43:48 +0200
commit192aa78c90253bede27b2745d4e80aeed79a3aef (patch)
tree3288344a8695ac4fd53162546fb051229c921e4d /docs/index.rst
parenta6cb7f927f40bd129f31493c37dfe7d0d6f6a070 (diff)
parent73f54f47a7d4eac329c27af71c7fc5ad432d2e84 (diff)
downloadpsutil-get_open_files_thread.tar.gz
Merge branch 'master' into get_open_files_threadget_open_files_thread
Diffstat (limited to 'docs/index.rst')
-rw-r--r--docs/index.rst22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/index.rst b/docs/index.rst
index efbab674..51cc6c7b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -568,7 +568,7 @@ Functions
import psutil
def on_terminate(proc):
- print("process {} terminated".format(proc))
+ print("process {} terminated with exit code {}".format(proc, proc.returncode))
procs = [...] # a list of Process instances
for p in procs:
@@ -598,9 +598,8 @@ Exceptions
method called the OS may be able to succeed in retrieving the process
information or not.
Note: this is a subclass of :class:`NoSuchProcess` so if you're not
- interested in retrieving zombies while iterating over all processes (e.g.
- via :func:`process_iter()`) you can ignore this exception and just catch
- :class:`NoSuchProcess`.
+ interested in retrieving zombies (e.g. when using :func:`process_iter()`)
+ you can ignore this exception and just catch :class:`NoSuchProcess`.
*New in 3.0.0*
@@ -769,6 +768,13 @@ Process class
10
>>>
+ Starting from `Python 3.3 <http://bugs.python.org/issue10784>`__ this
+ functionality is also available as
+ `os.getpriority() <http://docs.python.org/3/library/os.html#os.getpriority>`__
+ and
+ `os.setpriority() <http://docs.python.org/3/library/os.html#os.setpriority>`__
+ (UNIX only).
+
On Windows this is available as well by using
`GetPriorityClass <http://msdn.microsoft.com/en-us/library/ms683211(v=vs.85).aspx>`__
and `SetPriorityClass <http://msdn.microsoft.com/en-us/library/ms686219(v=vs.85).aspx>`__
@@ -779,12 +785,6 @@ Process class
>>> p.nice(psutil.HIGH_PRIORITY_CLASS)
- Starting from `Python 3.3 <http://bugs.python.org/issue10784>`__ this
- same functionality is available as
- `os.getpriority() <http://docs.python.org/3/library/os.html#os.getpriority>`__
- and
- `os.setpriority() <http://docs.python.org/3/library/os.html#os.setpriority>`__.
-
.. method:: ionice(ioclass=None, value=None)
Get or set
@@ -1225,7 +1225,7 @@ Popen class
:meth:`send_signal() <psutil.Process.send_signal()>`,
:meth:`terminate() <psutil.Process.terminate()>` and
:meth:`kill() <psutil.Process.kill()>`
- so that you don't accidentally terminate another process, fixing
+ so that you can't accidentally terminate another process, fixing
http://bugs.python.org/issue6973.
>>> import psutil