projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3aa0c9d
)
Make call of os.getppid() conditional: it is not available on Windows.
author
Georg Brandl
<georg@python.org>
Sun, 1 Jul 2012 07:47:54 +0000
(09:47 +0200)
committer
Georg Brandl
<georg@python.org>
Sun, 1 Jul 2012 07:47:54 +0000
(09:47 +0200)
Doc/library/multiprocessing.rst
patch
|
blob
|
history
diff --git
a/Doc/library/multiprocessing.rst
b/Doc/library/multiprocessing.rst
index a9512f3358a4cb50cb5b4157cabe51237f2eee69..f503f4dfb41c55443b6299fe964142fe6101968a 100644
(file)
--- a/
Doc/library/multiprocessing.rst
+++ b/
Doc/library/multiprocessing.rst
@@
-79,7
+79,8
@@
To show the individual process IDs involved, here is an expanded example::
def info(title):
print(title)
print('module name:', __name__)
- print('parent process:', os.getppid())
+ if hasattr(os, 'getppid'): # only available on Unix
+ print('parent process:', os.getppid())
print('process id:', os.getpid())
def f(name):