[docs] [issue21791] Proper return status of os.WNOHANG is not always (0, 0)

Eric Radman report at bugs.python.org
Tue Jun 17 18:23:08 CEST 2014


New submission from Eric Radman:

The documentation for the WNOHANG flag (https://docs.python.org/3.4/library/os.html#os.WNOHANG) suggests that a return value of (0, 0) indicates success. This is not always true, the second value may contain a value even on success. On OpenBSD 5.5 this is an exaple status of a process that is still running:

pid, status = os.waitpid(pid, os.WNOHANG)
(0, -168927460)

It would be more accurate to say that if pid==0 then the process is running and that status is platform dependent.

----------
assignee: docs at python
components: Documentation
messages: 220843
nosy: docs at python, eradman
priority: normal
severity: normal
status: open
title: Proper return status of os.WNOHANG is not always (0, 0)
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21791>
_______________________________________


More information about the docs mailing list