summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-09-23 14:21:42 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2016-09-23 14:21:42 +0200
commit7713f85074c872ec1ae128f9c62a1da1ffb5f960 (patch)
tree345d9e27ab18af94f8a18d57233bdff9f01daa8d
parenteec3c620a9e9fc3d2ba551cf1379d61aebcdfa48 (diff)
downloadpsutil-7713f85074c872ec1ae128f9c62a1da1ffb5f960.tar.gz
fix test + update doc
-rw-r--r--docs/index.rst13
-rwxr-xr-xscripts/procinfo.py3
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 5ead5814..9c225ea4 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1429,9 +1429,8 @@ Process class
`signal module <http://docs.python.org//library/signal.html>`__
constants) preemptively checking whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, sig)``.
- On Windows only **SIGTERM**, **CTRL_C_EVENT** and **CTRL_BREAK_EVENT**
- signals are supported and **SIGTERM** is treated as an alias for
- :meth:`kill()`.
+ On Windows only *SIGTERM*, *CTRL_C_EVENT* and *CTRL_BREAK_EVENT* signals
+ are supported and *SIGTERM* is treated as an alias for :meth:`kill()`.
.. versionchanged::
3.2.0 support for CTRL_C_EVENT and CTRL_BREAK_EVENT signals on Windows
@@ -1439,28 +1438,28 @@ Process class
.. method:: suspend()
- Suspend process execution with **SIGSTOP** signal preemptively checking
+ Suspend process execution with *SIGSTOP* signal preemptively checking
whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, signal.SIGSTOP)``.
On Windows this is done by suspending all process threads execution.
.. method:: resume()
- Resume process execution with **SIGCONT** signal preemptively checking
+ Resume process execution with *SIGCONT* signal preemptively checking
whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, signal.SIGCONT)``.
On Windows this is done by resuming all process threads execution.
.. method:: terminate()
- Terminate the process with **SIGTERM** signal preemptively checking
+ Terminate the process with *SIGTERM* signal preemptively checking
whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, signal.SIGTERM)``.
On Windows this is an alias for :meth:`kill`.
.. method:: kill()
- Kill the current process by using **SIGKILL** signal preemptively
+ Kill the current process by using *SIGKILL* signal preemptively
checking whether PID has been reused.
On UNIX this is the same as ``os.kill(pid, signal.SIGKILL)``.
On Windows this is done by using
diff --git a/scripts/procinfo.py b/scripts/procinfo.py
index 7ef2ccc7..c62210b9 100755
--- a/scripts/procinfo.py
+++ b/scripts/procinfo.py
@@ -211,7 +211,8 @@ def run(pid, verbose=False):
if psutil.WINDOWS:
print_('num-handles', pinfo['num_handles'])
- print_('I/O', str_ntuple(pinfo['io_counters'], bytes2human=True))
+ if 'io_counters' in pinfo:
+ print_('I/O', str_ntuple(pinfo['io_counters'], bytes2human=True))
print_("ctx-switches", str_ntuple(pinfo['num_ctx_switches']))
if children:
template = "%-6s %s"