This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients docs@python, georg.brandl
Date 2020-09-21.16:41:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There are a few points where `os.waitid()` docs need improvement. Current text:

Wait for the completion of one or more child processes. idtype can be P_PID, P_PGID or P_ALL. id specifies the pid to wait on. options is constructed from the ORing of one or more of WEXITED, WSTOPPED or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT. The return value is an object representing the data contained in the siginfo_t structure, namely: si_pid, si_uid, si_signo, si_status, si_code or None if WNOHANG is specified and there are no children in a waitable state.

Problems are:

* The given use of the *pid* argument is only for the case of `idtype=P_PID`.  For `P_ALL` it is ignored, and for `P_PGID` it specifies that the child's PGID must be *pid*.

* "One or more child processes" is misleading -- the function waits for until exactly one child process to exit (or aborts with WNOHANG).  Sure, there can be multiple candidate processes, but this should be formulated differently.

* The explanation of *options* is quite cumbersome, it seems to be copied directly from the manpage (where it is laid out much more clearly and with explanation of the different options).

Additionally the flags P_*, W* and CLD_* are just stated as-is, and need explanation in the docs. You should not need to consult the manpage to be able to use the function at all.
Date User Action Args
2020-09-21 16:41:50georg.brandlsetrecipients: + georg.brandl, docs@python
2020-09-21 16:41:50georg.brandlsetmessageid: <>
2020-09-21 16:41:50georg.brandllinkissue41825 messages
2020-09-21 16:41:49georg.brandlcreate