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@python components: Documentation messages: 220843 nosy: docs@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 <rep...@bugs.python.org> <http://bugs.python.org/issue21791> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com