#6481: fix typo in os.system() replacement.
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index b903c8c..09ae62b 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -404,7 +404,7 @@
    sts = os.system("mycmd" + " myarg")
    ==>
    p = Popen("mycmd" + " myarg", shell=True)
-   sts = os.waitpid(p.pid, 0)
+   sts = os.waitpid(p.pid, 0)[1]
 
 Notes: