summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/library/multiprocessing.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 303cdbcf93..bac9cf05b7 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -81,7 +81,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):