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.

Title: os.waitpid does not return (0,0) when child has not exited (FreeBSD)
Type: Stage:
Components: FreeBSD, Library (Lib) Versions: Python 3.4, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Casey Lucas, iritkatriel, koobs
Priority: normal Keywords:

Created on 2016-08-19 23:59 by Casey Lucas, last changed 2022-04-11 14:58 by admin.

File name Uploaded Description Edit Casey Lucas, 2016-08-19 23:59 test to show invalid waitpid return value
Messages (2)
msg273167 - (view) Author: Casey Lucas (Casey Lucas) Date: 2016-08-19 23:59
I'm not sure if this a Python issue or a FreeBSD issue but the return value from os.waitpid is not reliably (0,0) on FreeBSD when the WNOHANG is used and the child process has not yet exited.  Python docs say that the return value will be (0,0) but this is not the case.  I believe it is because the FreeBSD implementation of waitpid writes an uninitialized value to the status field when a child process is not available.  See also:

Maybe this is just a documentation issue?  Or does the C code in the Python library need to handle this case?
msg396519 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-24 23:46
See also issue34278, issue38802, issue41825.
Date User Action Args
2022-04-11 14:58:35adminsetgithub: 71995
2021-06-24 23:46:36iritkatrielsetnosy: + iritkatriel
messages: + msg396519
2016-08-19 23:59:55Casey Lucascreate